| Summary: | [quick assist] 'Assign parameter to new field' must not make field final' | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, deepakazad, markus.kell.r, milesparker, stanio |
| Version: | 3.2 | ||
| Target Milestone: | 3.8 M7 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
That these fields are created final has been there for quite a while (maybe 3.0). I even think to have an error here is a good thing, as you really also have to initialize the field in the other constructor/ I agree with Markus. This got broken by fix for bug 42328. People who want their fields 'final' can use the Save Action. Thanks Dani for the tip! All this time I thought it was just me that was bugged by this. :D The field is not made final any more, unless the class has only a single constructor and the "Add final modifier to private fields" cleanup is enabled as Save Action. http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=e1164504c89003e2a6ee1c3c312ae6247c431cfb |
I20060307-1315 package xy; public class Try{ public Try(String arg) { } public Try() { } } Quick assist on 'arg' to assign to a new field -> field is final, yielding a compile error -> expected: field not final as it was in earlier builds