diff options
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java index eaede3c8b2..7a71bd1a81 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java @@ -12,6 +12,7 @@ * bug 349326 - [1.7] new warning for missing try-with-resources * bug 265744 - Enum switch should warn about missing default * bug 374605 - Unreasonable warning for enum-based switch statements + * bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null" *******************************************************************************/ package org.eclipse.jdt.internal.compiler.ast; @@ -67,7 +68,7 @@ public class SwitchStatement extends Statement { this.expression.checkNPE(currentScope, flowContext, flowInfo); } SwitchFlowContext switchContext = - new SwitchFlowContext(flowContext, this, (this.breakLabel = new BranchLabel())); + new SwitchFlowContext(flowContext, this, (this.breakLabel = new BranchLabel()), true); // analyse the block by considering specially the case/default statements (need to bind them // to the entry point) |