Add final to method parameters
See original GitHub issueThanks for updating the save actions to 0.9. One thing is still annoying and not what I expected updating code that had been written with eclipse.
The option “Add final to local variable” I would like to check, because I want the final added to:
String text = object.getName();
(Otherwise checkstyle will complain.)
But I do not need the final added to all parameters of all method declarations.
Gives many superflous code changes. Please do not include that in this option.
Perfectly all right would be a separate option “Add final to method parameters” which I could uncheck if desired.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:6 (3 by maintainers)
Top Results From Across the Web
final keyword in method parameters - java - Stack Overflow
The final keyword on a method parameter means absolutely nothing to the caller. It also means absolutely nothing to ...
Read more >In Java, should I use "final" for parameters and locals even ...
Java allows marking variables (fields / locals / parameters) as final , to prevent re-assigning into ...
Read more >Final method parameters in java - BeginnersBook
In the last tutorial we discussed about final keyword. In this post we are gonna discuss about final method parameters. You must have...
Read more >What is a final parameter in java? - Tutorialspoint
You can pass final variables as the parameters to methods in Java. A final variable can be explicitly initialized only once.
Read more >Using the final keyword on method parameters
At least the final keyword on method parameters can be seen as an indicator for the Java compiler that this parameter can not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I wanted to request the same thing. A separate “Add final to method parameters” would be great.
Moved to https://github.com/dubreuia/intellij-plugin-save-actions/projects/2