mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-17 11:40:50 +07:00
25 lines
569 B
Java
25 lines
569 B
Java
import org.jetbrains.annotations.NotNull;
|
|
|
|
class Foo {
|
|
public int getValue() {
|
|
return 5;
|
|
}
|
|
|
|
public void nullcheck() {
|
|
Integer x = getValue();
|
|
System.out.println(<warning descr="Condition 'x == null' is always 'false'">x == null</warning> ? "NULL" : Integer.toHexString(x));
|
|
}
|
|
}
|
|
|
|
class Bar {
|
|
@NotNull
|
|
public Integer getValue() {
|
|
return 5;
|
|
}
|
|
|
|
public void nullcheck() {
|
|
Integer x = getValue();
|
|
System.out.println(<warning descr="Condition 'x == null' is always 'false'">x == null</warning> ? "NULL" : Integer.toHexString(x));
|
|
}
|
|
}
|