mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-122414 Boolean expression simplification changes behavior of the code
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<problem>
|
||||
<file>Test.java</file>
|
||||
<line>51</line>
|
||||
<description>Condition <code>o</code> at the left side of assignment expression is always <code>false</code>. Can be simplified to normal assignment.</description>
|
||||
<description>Condition <code>o</code> at the left side of assignment expression is always <code>false</code>. Can be simplified.</description>
|
||||
</problem>
|
||||
|
||||
</problems>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
class Contracts {
|
||||
|
||||
private boolean method(boolean a) {
|
||||
boolean b = true;
|
||||
<warning descr="Condition 'b' at the left side of assignment expression is always 'true'. Can be simplified"><caret>b</warning> |= a;
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Contracts {
|
||||
|
||||
private boolean method(boolean a) {
|
||||
boolean b = true;
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user