Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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.java4
1 files changed, 2 insertions, 2 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 eebcfca755..b3203a4767 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
@@ -112,7 +112,7 @@ public class SwitchStatement extends Expression {
protected void completeNormallyCheck(BlockScope blockScope) {
// do nothing
}
- protected boolean checkNullDefaultFlow() {
+ protected boolean needToCheckFlowInAbsenceOfDefaultBranch() {
return true;
}
@Override
@@ -178,7 +178,7 @@ public class SwitchStatement extends Expression {
this.synthetic = sourceTypeBinding.addSyntheticMethodForSwitchEnum(resolvedTypeBinding, this);
}
// if no default case, then record it may jump over the block directly to the end
- if (this.defaultCase == null && checkNullDefaultFlow()) {
+ if (this.defaultCase == null && needToCheckFlowInAbsenceOfDefaultBranch()) {
// only retain the potential initializations
flowInfo.addPotentialInitializationsFrom(caseInits.mergedWith(switchContext.initsOnBreak));
this.mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);

Back to the top