This might be a simple question: How can I massively refactor my Java code to make most of the method argument as "final"? This is to follow one of our "checkstyle" rule. We have thousands of Java files, so manually edit all of them seems not an acceptable solution to us.
I didn't find any such refactor option in IntelliJ. Anybody knows any tool that can help? Or any smart approach to achieve that?
You can use IntelliJ's inspections mechanism for this:
final
modifier in all the missing places.Once you've done this, you may want to enable this inspection in your IDE so it warns you about making further mistakes: