Back to Intellij Community

GroovyUnnecessaryContinue

plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyUnnecessaryContinue.html

2025.3-rc-2373 B
Original Source

Reports continue statements if they are last reachable statements in the loop. These continue statements are unnecessary and can be safely removed.

Example:

for(int i in array) {
      println(i)
      continue
  }

After the quick-fix is applied:

for(int i in array) {
      println(i)
  }

For more information, see the same inspection in Java.