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

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_CLDC.java (+51 lines)
Lines 262-265 Link Here
262
		"}";
262
		"}";
263
	checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput);
263
	checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput);
264
}
264
}
265
public void test004() {
266
	this.runConformTest(
267
		new String[] {
268
			"X.java",
269
			"import java.io.InputStream;\n" + 
270
			"\n" + 
271
			"public class X {\n" + 
272
			"	private static final Y[] A = new Y[1];\n" + 
273
			"\n" + 
274
			"	public static void x() {\n" + 
275
			"		for (int i = 0; i < 0; i++) {\n" + 
276
			"			try {\n" + 
277
			"				A[i] = foo(X.class.getResourceAsStream(\"\"), null);\n" + 
278
			"			} catch (Throwable e) {\n" + 
279
			"			}\n" + 
280
			"		}\n" + 
281
			"	}\n" + 
282
			"\n" + 
283
			"	public static boolean a = false;\n" + 
284
			"\n" + 
285
			"	private static int b = -1;\n" + 
286
			"\n" + 
287
			"	private static int C = 0;\n" + 
288
			"\n" + 
289
			"	public static void z(int c) {\n" + 
290
			"		if (!a || (b == c && A[c].foo() == C)) {\n" + 
291
			"			return;\n" + 
292
			"		}\n" + 
293
			"		y();\n" + 
294
			"		b = c;\n" + 
295
			"		try {\n" + 
296
			"			A[c].bar();\n" + 
297
			"		} catch (Throwable e) {\n" + 
298
			"		}\n" + 
299
			"	}\n" + 
300
			"\n" + 
301
			"	public static void y() {\n" + 
302
			"	}\n" + 
303
			"\n" + 
304
			"	static Y foo(InputStream stream, String s) {\n" + 
305
			"		return null;\n" + 
306
			"	}\n" + 
307
			"}",
308
			"Y.java",
309
			"interface Y {\n" + 
310
			"	int foo();\n" + 
311
			"	void bar();\n" + 
312
			"}"
313
		},
314
		"");
315
	}
265
}
316
}

Return to bug 208960