mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-74518: Associations for variable negation haven't been cleared on flush.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems />
|
||||
<problems>
|
||||
<problem>
|
||||
<file>NoWarnings.java</file>
|
||||
<line>9</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Constant conditions & exceptions</problem_class>
|
||||
<description>Condition <code>i == 1</code> is always <code>true</code> when reached</description>
|
||||
</problem>
|
||||
</problems>
|
||||
|
||||
|
||||
@@ -5,12 +5,17 @@ public class NoWarnings {
|
||||
int i = 1;
|
||||
|
||||
boolean b = true;
|
||||
while (i < 200) {
|
||||
if (b && i == 1) { // Warning here: i == 1 is always true, but it is not so.
|
||||
while (true) {
|
||||
if (b && i == 1) {
|
||||
b = false;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
else {
|
||||
i = g();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int g() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user