Community
Participate
Working Groups
Snippet switch (string) { case "one": System.out.println("Accept"); return true; case "two": System.out.println("Unsure"); return true; default: System.out.println("Fail"); return false; } 1. Select the string "two" in second case statement 2. Press Ctrl + 1 and invoke extract to constant The result is creation of a constant private static final String TWO = "two"; however, the string "two" is not replaced by the constant TWO in second case statement.
Not a new bug. *** This bug has been marked as a duplicate of bug 211529 ***