Back to Intellij Community

ForLoopWithMissingComponent

java/java-impl/resources/inspectionDescriptions/ForLoopWithMissingComponent.html

2025.3-rc-2369 B
Original Source

Reports for loops that lack initialization, condition, or update clauses. Some coding styles prohibit such loops.

Example:

for (int i = 0;;i++) {
    // body
  }

Use the Ignore collection iterations option to ignore loops which use an iterator. This is a standard way to iterate over a collection in which the for loop does not have an update clause.