Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2019-09-20 07:05:28 +0000
committerSarika Sinha2019-09-20 07:05:28 +0000
commit42e8e7c7d3c0a2353712025cd77254613c5d31d7 (patch)
tree1f8694bbdc0a94446c4e0b6e291805a24289b532
parentd629b1096b8cb254d581d898bc8e532a43fadd9d (diff)
downloadeclipse.jdt.core-42e8e7c7d3c0a2353712025cd77254613c5d31d7.tar.gz
eclipse.jdt.core-42e8e7c7d3c0a2353712025cd77254613c5d31d7.tar.xz
eclipse.jdt.core-42e8e7c7d3c0a2353712025cd77254613c5d31d7.zip
Revert "Bug 544943 - [13][codegen] Exception while codegen for multi-nested switch expression with try "
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java60
2 files changed, 2 insertions, 62 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 32efd3c180..351dc4bf16 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
@@ -2921,7 +2921,7 @@ public class SwitchExpressionTest extends AbstractRegressionTest {
"Duplicate case\n" +
"----------\n");
}
- public void _testBug544943() {
+ public void testBug544943() {
runConformTest(
new String[] {
"X.java",
@@ -2956,7 +2956,7 @@ public class SwitchExpressionTest extends AbstractRegressionTest {
},
"1");
}
- public void _testBug544943_2() {
+ public void testBug544943_2() {
runConformTest(
new String[] {
"X.java",
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java
index 8c981768d0..f0dd255882 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java
@@ -3480,64 +3480,4 @@ public class SwitchExpressionsYieldTest extends AbstractRegressionTest {
"String literal is not properly closed by a double-quote\n" +
"----------\n");
}
- public void testBug544943() {
- runConformTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " @SuppressWarnings(\"preview\")\n" +
- " public static int foo(int i) throws MyException {\n" +
- " int v = -1;\n" +
- " try {\n" +
- " v = switch (i) {\n" +
- " case 0 -> switch(i) {\n" +
- " case 0 -> 1;\n" +
- " default -> throw new MyException();\n" +
- " };\n" +
- " default -> 1;\n" +
- " };\n" +
- " } finally {\n" +
- " // do nothing\n" +
- " }\n" +
- " return v;\n" +
- " } \n" +
- " public static void main(String argv[]) {\n" +
- " try {\n" +
- " System.out.println(X.foo(0));\n" +
- " } catch (MyException e) {\n" +
- " e.printStackTrace();\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "class MyException extends Exception {\n" +
- " private static final long serialVersionUID = 3461899582505930473L; \n" +
- "}"
- },
- "1");
- }
- public void testBug544943_2() {
- runConformTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " @SuppressWarnings({ \"preview\" })\n" +
- " public static int foo(int i) throws Exception {\n" +
- " int v = switch (i) {\n" +
- " case 0 -> switch (i) {\n" +
- " case 0 -> 0;\n" +
- " default-> throw new Exception();\n" +
- " case 3 -> 3;\n" +
- " case 2 -> throw new Exception();\n" +
- " };\n" +
- " default -> 0;\n" +
- " };\n" +
- " return v;\n" +
- " }\n" +
- " public static void main(String argv[]) throws Exception {\n" +
- " System.out.println(X.foo(1));\n" +
- " }\n" +
- "}"
- },
- "0");
- }
} \ No newline at end of file

Back to the top