### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java,v retrieving revision 1.11 diff -u -r1.11 StackMapAttributeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java 31 Aug 2006 22:01:51 -0000 1.11 +++ src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java 14 Sep 2006 00:42:57 -0000 @@ -2067,4 +2067,32 @@ assertEquals("Wrong contents", expectedOutput, actualOutput); } } + + // 157247 + public void test022() { + this.runConformTest( + new String[] { + "X.java", + "public class X {\n" + + " public static void main(String[] args) {\n" + + " String errorMessage;\n" + + " try {\n" + + " foo();\n" + + " errorMessage = \"No exception thrown\";\n" + + " } catch (Exception e) {\n" + + " if (e instanceof NullPointerException) {\n" + + " System.out.println(\"SUCCESS\");\n" + + " return;\n" + + " }\n" + + " errorMessage = \"Exception thrown\" + e;\n" + + " }\n" + + " System.out.println(errorMessage);\n" + + " }\n" + + " public static void foo() {\n" + + " throw new NullPointerException();\n" + + " }\n" + + "}", + }, + "SUCCESS"); + } }