Community
Participate
Working Groups
The 'Assign parameter to field' quick assist for constructors does not declare the created field as final any more. Prior to version 3.8 the field was made final. Given this code class Foo { Foo( Object param ) { } } Invoking the quick assist on 'param' would result in this code: class Foo { private *final* Object param; Foo( Object param ) { this.param = param; } } Since 3.8, a non-final field 'param' is created: private Object param; This requires to manually correct the quick assist code in almost all cases. Is this a bug or was this change made intentionally?
(In reply to comment #0) > This requires to manually correct the quick assist code in almost all cases. Is > this a bug or was this change made intentionally? This is intentional, see bug 130922. If you like your fields to be final you can use the "Add final modifier to private fields" Save Action or Clean up. You can also use "Change modifiers to final where possible" quick assist on a selection.
*** Bug 389246 has been marked as a duplicate of this bug. ***