Text of codeql.github.com › codeql-query-help › java › java-continue-in-false-loop as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Continue statement that does not continue — CodeQL query help documentation

CodeQL query help documentation » CodeQL query help for Java and Kotlin » Continue statement that does not continue ¶ ID: java/continue-in-false-loop Kind: problem Security severity: Severity: warning Precision: high Tags: - quality - reliability - correctness Query suites: - java-code-quality.qls - java-security-and-quality.qls Click to see the query in the CodeQL repository A continue statement only re-runs the loop if the loop condition is true.

Therefore using continue in a loop with a constant false condition will never cause the loop body to be re-run, which is misleading. Recommendation ¶ Replace the continue statement with a break statement if the intent is to break from the loop. References ¶ Java Language Specification: 14.13 The do Statement . © GitHub, Inc. Terms Privacy