| Summary: | [extract constant] erroneous "not a valid static constant" | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Zorzella Mising name <zorzella> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | noopur_gupta |
| Version: | 4.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Use code snippet below. When trying to extract "bar" + "baz" as a constant, Eclipse says that's not possible because "it is not a valid static constant". Inlining "foo" makes it work. ========================================== public class ExtractConstantBug { void method() { String foo = "foo"; String string = foo + "/" + // Select "bar" + "baz" and do Refactor > Extract Constant "bar" + "baz"; } }