mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
24 lines
664 B
Java
24 lines
664 B
Java
import org.jetbrains.annotations.NotNull;
|
|
|
|
import javax.swing.*;
|
|
|
|
class Test {
|
|
public void setObj(Object obj) {
|
|
this.obj = obj;
|
|
}
|
|
|
|
public void test() {
|
|
obj = new Object();
|
|
SwingUtilities.invokeLater(new Runnable() {
|
|
public void run() {
|
|
Object o = obj;
|
|
if (<warning descr="Condition 'o != null' is always 'true'">o != null</warning>) {
|
|
System.out.println("x");
|
|
}
|
|
}
|
|
});
|
|
obj = <warning descr="'null' is assigned to a variable that is annotated with @NotNull">null</warning>;
|
|
}
|
|
|
|
@NotNull private volatile Object obj;
|
|
} |