Community
Participate
Working Groups
1) Copy paste this code in Java 17 project ( enable preview) public class X { public static void main(String[] args) { foo(Integer.valueOf(5)); foo(new Object()); } private static void foo(Object o) { switch (o) { case Integer i -> System.out.println("Integer:" + i); case String /*here*/str && str.length()>0 -> System.out.println("String:" + str + str); default -> System.out.println("Object" + o); } } } 2) Select str 3) Refactor rename to str2 Expectation : the other 3 reference are renamed Result: nothing happens Please note that selecting str and pressing control-shift-G gives 3 references Same problem with pattern switch too.
Waiting on ASTNode changes going into JDT Core. Will have test once these changes go in.
Fixed as a result of fixes for bug 573941