Groovy
Variable can be final
Warning
Code Style
New
Last modified: 03 December 2024Reports parameters or local variables that may have a final modifier added.
Example:
def list = [1,2,3]
return list
After the quick-fix is applied:
final def list = [1,2,3]
return list
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
GroovyVariableCanBeFinal
For more information, see the same inspection in Java.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Groovy, 243.23126 |
Thanks for your feedback!
Was this page helpful?