### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java,v retrieving revision 1.37 diff -u -r1.37 DeprecatedTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java 27 Jun 2008 16:04:44 -0000 1.37 +++ src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java 13 Sep 2008 00:28:57 -0000 @@ -796,6 +796,68 @@ // javac options JavacTestOptions.Excuse.EclipseWarningConfiguredAsError /* javac test options */); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=247206 +public void test020() { + Map customOptions = new HashMap(); + customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); + customOptions.put(CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod, CompilerOptions.IGNORE); + + this.runConformTest( + new String[] { + "test1/E.java", + "package test1;\n" + + "\n" + + "public class E implements I {\n" + + " public I2 foo() {\n" + + " return null;\n" + + " }\n" + + "}\n" + + "interface I {\n" + + " /** @deprecated */\n" + + " public I2 foo();\n" + + "}\n" + + "/** @deprecated */\n" + + "interface I2 {}", + }, + "", // expected output + null, + true, // flush previous output dir content + null, // special vm args + customOptions, // custom options + null); // custom requestor +} +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=247206 +public void test021() { + Map customOptions = new HashMap(); + customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); + customOptions.put(CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod, CompilerOptions.IGNORE); + + this.runConformTest( + new String[] { + "test1/E.java", + "package test1;\n" + + "\n" + + "public class E implements I {\n" + + " public I2 foo() {\n" + + " return null;\n" + + " }\n" + + "}\n" + + "interface I {\n" + + " /** @deprecated */\n" + + " public I2 foo();\n" + + "}\n", + "test1/I2.java", + "package test1;\n" + + "/** @deprecated */\n" + + "interface I2 {}", + }, + "", // expected output + null, + true, // flush previous output dir content + null, // special vm args + customOptions, // custom options + null); // custom requestor +} public static Class testClass() { return DeprecatedTest.class; }