Files
openide/java/java-tests/testData/inspection/dataFlow/fixture/IncompleteSwitchEnum.java
T
Tagir Valeev 583f188ef6 ControlFlowAnalyzer: repeat unboxing for every case label if necessary
Without this it was possible (at least on the incorrect code) that boxed and unboxed classes for the same value get united, which in turn caused repeating entry in DfaMemoryStateImpl#myIdToEqClassesIndices, which could cause NPE when performing successive flush for given variable.
Now we throw directly at classes unification attempt to catch illegal state earlier
Fixes EA-118152 - IAE: EqClass.$$$reportNull$$$
2018-07-12 13:07:16 +07:00

20 lines
309 B
Java

public enum Test {
VALUE;
void test() {
Integer code = getCode();
switch (code) {
case VALUE.value()<EOLError descr="':' expected"></EOLError>
}
if (code == VALUE.value()) {
getCode();
}
}
int value() {
return ordinal();
}
public native Integer getCode();
}