diff options
author | Manoj Palat | 2019-04-09 09:54:27 +0000 |
---|---|---|
committer | Manoj Palat | 2019-04-09 09:56:01 +0000 |
commit | 4ae6e3dc7e90cc8fa4f2d38918bce0fd7521a18e (patch) | |
tree | 79a4eeef03a5a7130ea630caf956735abec5ee92 | |
parent | d2a3263398d79b881972f7a005cf4b33743184c5 (diff) | |
download | eclipse.jdt.core-4ae6e3dc7e90cc8fa4f2d38918bce0fd7521a18e.tar.gz eclipse.jdt.core-4ae6e3dc7e90cc8fa4f2d38918bce0fd7521a18e.tar.xz eclipse.jdt.core-4ae6e3dc7e90cc8fa4f2d38918bce0fd7521a18e.zip |
Reverting bug 545715 I20190409-1800I20190409-0600
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java index 0d8ac4a28d..1fdedea27e 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java @@ -2362,7 +2362,7 @@ public class SwitchExpressionTest extends AbstractRegressionTest { new String[] { "--enable-preview"}, options); } - public void testBug545915_01() { + public void _testBug545915_01() { runConformTest( new String[] { "X.java", diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BreakStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BreakStatement.java index a68fa56e40..a5b07d0bb2 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BreakStatement.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BreakStatement.java @@ -50,7 +50,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl return flowInfo; // pretend it did not break since no actual target } - if (this.expression != null) { + if (this.switchExpression != null && this.expression != null) { flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo); this.expression.checkNPEbyUnboxing(currentScope, flowContext, flowInfo); if (flowInfo.reachMode() == FlowInfo.REACHABLE && currentScope.compilerOptions().isAnnotationBasedNullAnalysisEnabled) |