View | Details | Raw Unified | Return to bug 157247 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java (+28 lines)
Lines 2070-2073 Link Here
2070
			assertEquals("Wrong contents", expectedOutput, actualOutput);
2070
			assertEquals("Wrong contents", expectedOutput, actualOutput);
2071
		}
2071
		}
2072
	}
2072
	}
2073
	
2074
	// 157247
2075
	public void test022() {
2076
		this.runConformTest(
2077
            new String[] {
2078
        		"X.java",
2079
        		"public class X {\n" + 
2080
        		"	public static void main(String[] args) {\n" + 
2081
        		"		String errorMessage;\n" + 
2082
        		"		try {\n" + 
2083
        		"			foo();\n" + 
2084
        		"			errorMessage = \"No exception thrown\";\n" + 
2085
        		"		} catch (Exception e) {\n" + 
2086
        		"			if (e instanceof NullPointerException) {\n" + 
2087
        		"				System.out.println(\"SUCCESS\");\n" + 
2088
        		"				return;\n" + 
2089
        		"			}\n" + 
2090
        		"			errorMessage = \"Exception thrown\" + e;\n" + 
2091
        		"		}\n" + 
2092
        		"		System.out.println(errorMessage);\n" + 
2093
        		"	}\n" + 
2094
        		"	public static void foo() {\n" + 
2095
        		"		throw new NullPointerException();\n" + 
2096
        		"	}\n" + 
2097
        		"}",
2098
            },
2099
			"SUCCESS");
2100
	}
2073
}
2101
}

Return to bug 157247