Groovy
Unnecessary 'return' statement
Warning
Code Style
Last modified: 03 December 2024Reports return
statements at the end of constructors and methods returning void
. These are unnecessary and may be safely removed.
Example:
void foo (String s){
print(s)
return
}
After the quick-fix is applied:
void foo (String s){
print(s)
}
- 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.
GroovyUnnecessaryReturn
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?