View | Details | Raw Unified | Return to bug 99986
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java (+37 lines)
Lines 3451-3454 Link Here
3451
		"Unhandled exception type IOException\n" +
3451
		"Unhandled exception type IOException\n" +
3452
		"----------\n");
3452
		"----------\n");
3453
}
3453
}
3454
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=79798
3455
public void test107() {
3456
	this.runNegativeTest(
3457
		new String[] {
3458
			"X.java",
3459
			"public class X {\n" +
3460
			"	public static void main(String[] args) {\n" +
3461
			"		C c = new D();\n" +
3462
			"		c.xyz();\n" +
3463
			"	}\n" +
3464
			"}\n" +
3465
			"class AException extends Exception { }\n" +
3466
			"class BException extends Exception { }\n" +
3467
			"interface A { void xyz() throws AException; }\n" +
3468
			"interface B { void xyz() throws BException; }\n" +
3469
			"interface C extends A, B { }\n" +
3470
			"class D implements C {\n" +
3471
			"	public void xyz() { System.out.println(1); }\n" +
3472
			"}"
3473
		},
3474
		"----------\n" + 
3475
		"1. ERROR in X.java (at line 4)\n" + 
3476
		"	c.xyz();\n" + 
3477
		"	^^^^^^^\n" + 
3478
		"Unhandled exception type AException\n" + 
3479
		"----------\n" + 
3480
		"2. WARNING in X.java (at line 7)\n" + 
3481
		"	class AException extends Exception { }\n" + 
3482
		"	      ^^^^^^^^^^\n" + 
3483
		"The serializable class AException does not declare a static final serialVersionUID field of type long\n" + 
3484
		"----------\n" + 
3485
		"3. WARNING in X.java (at line 8)\n" + 
3486
		"	class BException extends Exception { }\n" + 
3487
		"	      ^^^^^^^^^^\n" + 
3488
		"The serializable class BException does not declare a static final serialVersionUID field of type long\n" + 
3489
		"----------\n");
3490
}
3454
}
3491
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java (+22 lines)
Lines 3469-3472 Link Here
3469
		},
3469
		},
3470
		"");
3470
		"");
3471
}
3471
}
3472
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=79798
3473
public void test107() {
3474
	this.runConformTest(
3475
		new String[] {
3476
			"X.java",
3477
			"public class X {\n" +
3478
			"	public static void main(String[] args) {\n" +
3479
			"		C c = new D();\n" +
3480
			"		c.xyz();\n" +
3481
			"	}\n" +
3482
			"}\n" +
3483
			"class AException extends Exception { }\n" +
3484
			"class BException extends Exception { }\n" +
3485
			"interface A { void xyz() throws AException; }\n" +
3486
			"interface B { void xyz() throws BException; }\n" +
3487
			"interface C extends A, B { }\n" +
3488
			"class D implements C {\n" +
3489
			"	public void xyz() { System.out.println(1); }\n" +
3490
			"}"
3491
		},
3492
		"1");
3493
}
3472
}
3494
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java (+22 lines)
Lines 3542-3547 Link Here
3542
		},
3542
		},
3543
		"");
3543
		"");
3544
}
3544
}
3545
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=99986
3546
public void test107() {
3547
	this.runConformTest(
3548
		new String[] {
3549
			"X.java",
3550
			"public class X {\n" +
3551
			"	public static void main(String[] args) {\n" +
3552
			"		C c = new D();\n" +
3553
			"		c.xyz();\n" +
3554
			"	}\n" +
3555
			"}\n" +
3556
			"class AException extends Exception { }\n" +
3557
			"class BException extends Exception { }\n" +
3558
			"interface A { void xyz() throws AException; }\n" +
3559
			"interface B { void xyz() throws BException; }\n" +
3560
			"interface C extends A, B { }\n" +
3561
			"class D implements C {\n" +
3562
			"	public void xyz() { System.out.println(1); }\n" +
3563
			"}"
3564
		},
3565
		"1");
3566
}
3545
3567
3546
public static Class testClass() {
3568
public static Class testClass() {
3547
	return Compliance_1_5.class;
3569
	return Compliance_1_5.class;

Return to bug 99986