Bug 365976 - [clean up] Do not add final to parameters of abstract methods
Summary: [clean up] Do not add final to parameters of abstract methods
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 18:38 EST by jwnimmer CLA
Modified: 2011-12-14 05:13 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jwnimmer CLA 2011-12-07 18:38:44 EST
Build Identifier: M20110909-1335

In the current code clean-up feature, there is a "Code Style" option for "Variable declarations" to "Use modifier 'final' where possible" with a checkbox for "Parameter".  When checked, this causes 'final' to be added to abstract method parameters (among other things).

For an abstract method, the 'final' modifier on a parameter makes no difference in functionality -- it is only a matter of taste.  All other additions of final by the code clean-up action are meaningful (they prevent re-assigning variables).

As such, I believe that the action should be changed to leave alone the presence or absence of "final" on abstract method parameters.  To satisfy matters of taste, there are already other bugs open about removing unnecessary keywords (#130888), or about user preferences about which unnecessary keywords should appear during code generation, etc.


Reproducible: Always
Comment 1 Dani Megert CLA 2011-12-14 05:13:22 EST
I agree with this. Our normal strategy is to not generate redundant modifiers.