Files
Tagir Valeev 2401d40b17 DFA instruction visitor refactoring wave#6
Deparenthesize before report; fix reporting of negated boolean variable
2018-08-08 16:39:35 +07:00

17 lines
347 B
Java

import java.util.List;
class Test {
void test(boolean x, boolean y) {
if(!x && y) {
} else if(!x && <warning descr="Condition '!y' is always 'true' when reached">!y</warning>) {
}
}
void test(String type) {
if(type != null && (type.equals("foo") | type.equals("bar"))) {
System.out.println("Who knows");
}
}
}