Back to Intellij Community

GroovyInfiniteLoopStatement

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

2025.3-rc-2218 B
Original Source

Reports for, while, or do statements which can only exit by throwing an exception. While such statements may be correct, they usually happen by mistake.

Example:

while(true) {
  Thread.sleep(1000)
}