diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java index 4ac6c2f..404f065 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java @@ -529,15 +529,17 @@ */ private int getNullStatusAggressively(LocalVariableBinding local, FlowInfo flowInfo) { int reachMode = flowInfo.reachMode(); - int status = 0; - try { - // unreachable flowInfo is too shy in reporting null-issues, temporarily forget reachability: - if (reachMode != FlowInfo.REACHABLE) - flowInfo.tagBits &= ~FlowInfo.UNREACHABLE; - status = flowInfo.nullStatus(local); - } finally { - // reset - flowInfo.tagBits |= reachMode; + int status = FlowInfo.UNKNOWN; + if (flowInfo != FlowInfo.DEAD_END) { + try { + // unreachable flowInfo is too shy in reporting null-issues, temporarily forget reachability: + if (reachMode != FlowInfo.REACHABLE) + flowInfo.tagBits &= ~FlowInfo.UNREACHABLE; + status = flowInfo.nullStatus(local); + } finally { + // reset + flowInfo.tagBits |= reachMode; + } } // at this point some combinations are not useful so flatten to a single bit: if ((status & FlowInfo.NULL) != 0) {