blob: d9e998461aaf297e7a47ecbf6b8a2d909e611aad [file] [log] [blame]
import org.jetbrains.annotations.NotNull;
class X {
int foo(String d1, String d2) {
if(d1 == null | d2 == null)
return 0;
return d1.compareTo(d2);
}
void foo2(String d1, String d2) {
if(<warning descr="Condition 'd1 == null & d1 != null' is always 'false'">d1 == null & d1 != null</warning>)
System.out.println("impossible");
}
void foo3(String d1, String d2) {
if(d1 == null | <warning descr="Method invocation 'd1.compareTo(d2)' may produce 'java.lang.NullPointerException'">d1.compareTo(d2)</warning> > 0)
System.out.println("impossible");
}
}
class Doo {
void zoo(@NotNull Object t, @NotNull Object s) {
}
private void goo(Object t, Object t2) {
if (t != null & t2 != null) {
zoo(t, t2);
}
}
}