Java
Conditional break inside loop
Warning
New
Last modified: 03 December 2024Reports conditional breaks at the beginning or at the end of a loop and suggests adding a loop condition instead to shorten the code.
Example:
while (true) {
if (i == 23) break;
i++;
}
After the quick fix is applied:
while (i != 23) {
i++;
}
- 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.
ConditionalBreakInInfiniteLoop
Here you can find the description of settings available for the Conditional break inside loop inspection, and the reference of their default values.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?