| Summary: | [extract constant] 'Extract to constant' refactoring does not replace the string with the constant | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ankur Sharma <ankur_sharma> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | deepakazad |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Not a new bug. *** This bug has been marked as a duplicate of bug 211529 *** |
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.