mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
DfaPsiUtil.getBlockNotNullFields may run DFA for static initializer block. If it happens to be a local/anonymous class inside a method, that outer method was incorrectly used as a context. This caused wrong state of FieldChecker and might eventually lead to StackOverflowError. GitOrigin-RevId: a96b4527cb03d77160be3579935e47d79bfca48c
16 lines
324 B
Java
16 lines
324 B
Java
public class StaticFieldInAnonymous {
|
|
void test() {
|
|
Runnable r = new Runnable() {
|
|
private static final String s;
|
|
|
|
static {
|
|
s = "foo";
|
|
}
|
|
|
|
@Override
|
|
public void run() {
|
|
if (<warning descr="Condition 's == null' is always 'false'">s == null</warning>) {}
|
|
}
|
|
};
|
|
}
|
|
} |