Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 22703 Details for
Bug 76266
[plan][compiler] Access restriction should also apply to inherited members
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Tests - part added, part aligned according to the fix side effects -compiler
org.eclipse.jdt.core.tests.compiler_07.txt (text/plain), 29.07 KB, created by
Maxime Daniel
on 2005-06-09 11:37:04 EDT
(
hide
)
Description:
Tests - part added, part aligned according to the fix side effects -compiler
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2005-06-09 11:37:04 EDT
Size:
29.07 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java,v >retrieving revision 1.106 >diff -u -r1.106 AnnotationTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 9 Jun 2005 00:36:28 -0000 1.106 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 9 Jun 2005 14:35:26 -0000 >@@ -12,6 +12,7 @@ > > import java.io.File; > import java.io.IOException; >+import java.util.HashMap; > import java.util.Hashtable; > import java.util.Map; > >@@ -38,7 +39,7 @@ > static { > // TESTS_NAMES = new String[] { "test127" }; > // TESTS_NUMBERS = new int[] { 15 }; >- TESTS_RANGE = new int[] { 165, 170 }; >+// TESTS_RANGE = new int[] { 165, 170 }; > } > public static Test suite() { > Test suite = buildTestSuite(testClass()); >@@ -3670,8 +3671,8 @@ > "----------\n" + > "1. WARNING in Y.java (at line 1)\n" + > " public class Y extends X {\n" + >- " ^\n" + >- "The constructor X() is deprecated\n" + >+ " ^\n" + >+ "The type X is deprecated\n" + > "----------\n" + > "2. WARNING in Y.java (at line 2)\n" + > " void foo(){ super.foo(); }\n" + >@@ -3707,8 +3708,8 @@ > "----------\n" + > "1. WARNING in Y.java (at line 1)\n" + > " public class Y extends X {\n" + >- " ^\n" + >- "The constructor X() is deprecated\n" + >+ " ^\n" + >+ "The type X is deprecated\n" + > "----------\n" + > "2. WARNING in Y.java (at line 2)\n" + > " void foo(){ super.foo(); }\n" + >@@ -3922,8 +3923,8 @@ > "----------\n" + > "1. WARNING in Y.java (at line 1)\n" + > " public class Y extends X {\n" + >- " ^\n" + >- "The constructor X() is deprecated\n" + >+ " ^\n" + >+ "The type X is deprecated\n" + > "----------\n" + > "2. ERROR in Y.java (at line 4)\n" + > " Zork z;\n" + >@@ -4436,6 +4437,8 @@ > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=94308 > public void test142() { >+ // WORK look seems that OPTION_ReportInvalidJavadoc now defaults to error, >+ // be it because of the compiler, or of the test framework > this.runNegativeTest( > new String[] { > "X.java", >@@ -4463,7 +4466,166 @@ > " Zork z;\n" + > " ^^^^\n" + > "Zork cannot be resolved to a type\n" + >- "----------\n"); >+ "----------\n", >+ null, >+ true, >+ null); >+ } >+ public void test142b() { >+ Map raiseInvalidJavadocSeverity = >+ new HashMap(2); >+ raiseInvalidJavadocSeverity.put( >+ CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.ERROR); >+ // admittingly, when these are errors, SuppressWarnings is not enough to >+ // filter them out *but* the deprecation level being WARNING, we get them >+ // out anyway >+ // WORK look semantics >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "@SuppressWarnings(\"deprecation\")\n" + >+ "public class X extends p.OldStuff {\n" + >+ " /**\n" + >+ " * @see p.OldStuff#foo()\n" + >+ " */\n" + >+ " @Override\n" + >+ " public void foo() {\n" + >+ " super.foo();\n" + >+ " }\n" + >+ "}\n", >+ "p/OldStuff.java", >+ "package p;\n" + >+ "@Deprecated\n" + >+ "public class OldStuff {\n" + >+ " public void foo() {\n" + >+ " } \n" + >+ " Zork z;\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in p\\OldStuff.java (at line 6)\n" + >+ " Zork z;\n" + >+ " ^^^^\n" + >+ "Zork cannot be resolved to a type\n" + >+ "----------\n", >+ null, >+ true, >+ raiseInvalidJavadocSeverity); >+ } >+ public void test142c() { >+ Map raiseDeprecationReduceInvalidJavadocSeverity = >+ new HashMap(2); >+ raiseDeprecationReduceInvalidJavadocSeverity.put( >+ CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); >+ raiseDeprecationReduceInvalidJavadocSeverity.put( >+ CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.WARNING); >+ // WORK look I (Maxime) do not like this one; I'd rather see OPTION_ReportInvalidJavadoc >+ // override OPTION_ReportDeprecation; javac seems to have less flexibility than we >+ // have here >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "@SuppressWarnings(\"deprecation\")\n" + >+ "public class X extends p.OldStuff {\n" + >+ " /**\n" + >+ " * @see p.OldStuff#foo()\n" + >+ " */\n" + >+ " @Override\n" + >+ " public void foo() {\n" + >+ " super.foo();\n" + >+ " }\n" + >+ "}\n", >+ "p/OldStuff.java", >+ "package p;\n" + >+ "@Deprecated\n" + >+ "public class OldStuff {\n" + >+ " public void foo() {\n" + >+ " } \n" + >+ " Zork z;\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 2)\n" + >+ " public class X extends p.OldStuff {\n" + >+ " ^^^^^^^^^^\n" + >+ "The type OldStuff is deprecated\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 8)\n" + >+ " super.foo();\n" + >+ " ^^^^^^^^^^^\n" + >+ "The method foo() from the type OldStuff is deprecated\n" + >+ "----------\n" + >+ "----------\n" + >+ "1. ERROR in p\\OldStuff.java (at line 6)\n" + >+ " Zork z;\n" + >+ " ^^^^\n" + >+ "Zork cannot be resolved to a type\n" + >+ "----------\n", >+ null, >+ true, >+ raiseDeprecationReduceInvalidJavadocSeverity); >+ } >+ public void test142d() { >+ Map raiseDeprecationAndInvalidJavadocSeverity = >+ new HashMap(2); >+ raiseDeprecationAndInvalidJavadocSeverity.put( >+ CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); >+ raiseDeprecationAndInvalidJavadocSeverity.put( >+ CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.ERROR); >+ // WORK look seems that OPTION_ReportInvalidJavadoc now defaults to error, >+ // be it because of the compiler, or of the test framework >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "@SuppressWarnings(\"deprecation\")\n" + >+ "public class X extends p.OldStuff {\n" + >+ " /**\n" + >+ " * @see p.OldStuff#foo()\n" + >+ " */\n" + >+ " @Override\n" + >+ " public void foo() {\n" + >+ " super.foo();\n" + >+ " }\n" + >+ "}\n", >+ "p/OldStuff.java", >+ "package p;\n" + >+ "@Deprecated\n" + >+ "public class OldStuff {\n" + >+ " public void foo() {\n" + >+ " } \n" + >+ " Zork z;\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 2)\n" + >+ " public class X extends p.OldStuff {\n" + >+ " ^^^^^^^^^^\n" + >+ "The type OldStuff is deprecated\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 4)\n" + >+ " * @see p.OldStuff#foo()\n" + >+ " ^^^^^^^^^^\n" + >+ "Javadoc: The type OldStuff is deprecated\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 4)\n" + >+ " * @see p.OldStuff#foo()\n" + >+ " ^^^^^\n" + >+ "Javadoc: The method foo() from the type OldStuff is deprecated\n" + >+ "----------\n" + >+ "4. ERROR in X.java (at line 8)\n" + >+ " super.foo();\n" + >+ " ^^^^^^^^^^^\n" + >+ "The method foo() from the type OldStuff is deprecated\n" + >+ "----------\n" + >+ "----------\n" + >+ "1. ERROR in p\\OldStuff.java (at line 6)\n" + >+ " Zork z;\n" + >+ " ^^^^\n" + >+ "Zork cannot be resolved to a type\n" + >+ "----------\n", >+ null, >+ true, >+ raiseDeprecationAndInvalidJavadocSeverity); > } > public void _test143() { > this.runNegativeTest( >Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v >retrieving revision 1.20 >diff -u -r1.20 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 7 Jun 2005 12:53:11 -0000 1.20 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 9 Jun 2005 14:35:26 -0000 >@@ -17,7 +17,6 @@ > import java.text.MessageFormat; > > import junit.framework.Test; >-import junit.framework.TestSuite; > > import org.eclipse.jdt.core.tests.util.Util; > import org.eclipse.jdt.internal.compiler.batch.Main; >@@ -29,21 +28,27 @@ > public BatchCompilerTest(String name) { > super(name); > } >+// Use this static initializer to specify subset for tests. >+// All specified tests which do not belong to the class are skipped... >+static { >+// TESTS_PREFIX = "test00"; >+ // selects those methods that start with TESTS_PREFIX; must start >+ // by test anyway; >+// TESTS_NAMES = new String[] { "testBug82208_SearchAllTypeNames_CLASS" }; >+ // selects those methods that match exactly one of of the listed >+ // names >+// TESTS_NUMBERS = new int[] { 1, 2, 3 }; >+ // selects those methods which name matches 'test<value of i>' for >+ // exactly one of the provided integers; leading 0s are not >+ // significant (that is, '1' selects 'test001') >+// TESTS_RANGE = new int[] { 28, -1 }; >+ // selects those methods which name matches any number of the >+ // specified range, applying the rules of TESTS_NUMBERS above; >+ // specifying an upper range of -1 means 'up to the end of the >+ // list' >+} > public static Test suite() { >- if (false) { >- TestSuite suite = new TestSuite(); >- suite.addTest(new BatchCompilerTest("test032")); >- return suite; >- } >- if (false) { >- TestSuite suite = new TestSuite(); >- for (int i = 23; i < 27; i++) >- suite.addTest(new BatchCompilerTest("test0" + String.valueOf(i))); >- return suite; >- } >- return setupSuite(testClass()); >- // TODO find a way to reduce the number of command line tests to one per >- // test run (aka do not add 1.3, 1.4, 1.5 supplementary level) >+ return buildTestSuite(testClass(), highestComplianceLevels()); > } > > /** >Index: src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java,v >retrieving revision 1.17 >diff -u -r1.17 DeprecatedTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java 3 Jun 2005 01:00:16 -0000 1.17 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java 9 Jun 2005 14:35:26 -0000 >@@ -197,11 +197,6 @@ > "----------\n" + > "1. WARNING in A.java (at line 1)\n" + > " public class A extends X.Y {}\n" + >- " ^\n" + >- "The constructor X.Y() is deprecated\n" + >- "----------\n" + >- "2. WARNING in A.java (at line 1)\n" + >- " public class A extends X.Y {}\n" + > " ^^^\n" + > "The type X.Y is deprecated\n" + > "----------\n",// expected output >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java,v >retrieving revision 1.14 >diff -u -r1.14 JavadocTestForInterface.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java 20 May 2005 11:44:05 -0000 1.14 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java 9 Jun 2005 14:35:27 -0000 >@@ -28,6 +28,7 @@ > return buildTestSuite(javadocTestClass()); > } > static { // Use this static to initialize testNames (String[]) , testRange (int[2]), testNumbers (int[]) >+// TESTS_NAMES= new String [] {"test061"}; > } > > protected Map getCompilerOptions() { >@@ -1000,27 +1001,27 @@ > + " void foo() {\n" > + " }\n" > + "}\n" }, >- "----------\n" >- + "1. ERROR in X.java (at line 4)\n" >- + " * @see IX#x\n" >- + " ^\n" >- + "Javadoc: The field IX.x is deprecated\n" >- + "----------\n" >- + "2. ERROR in X.java (at line 5)\n" >- + " * @see IY\n" >- + " ^^\n" >- + "Javadoc: The type IY is deprecated\n" >- + "----------\n" >- + "3. ERROR in X.java (at line 6)\n" >- + " * @see IY#y\n" >- + " ^^\n" >- + "Javadoc: The type IY is deprecated\n" >- + "----------\n" >- + "4. ERROR in X.java (at line 6)\n" >- + " * @see IY#y\n" >- + " ^\n" >- + "Javadoc: The field IY.y is deprecated\n" >- + "----------\n"); >+ "----------\n" + >+ "1. WARNING in X.java (at line 4)\n" + >+ " * @see IX#x\n" + >+ " ^\n" + >+ "Javadoc: The field IX.x is deprecated\n" + >+ "----------\n" + >+ "2. WARNING in X.java (at line 5)\n" + >+ " * @see IY\n" + >+ " ^^\n" + >+ "Javadoc: The type IY is deprecated\n" + >+ "----------\n" + >+ "3. WARNING in X.java (at line 6)\n" + >+ " * @see IY#y\n" + >+ " ^^\n" + >+ "Javadoc: The type IY is deprecated\n" + >+ "----------\n" + >+ "4. WARNING in X.java (at line 6)\n" + >+ " * @see IY#y\n" + >+ " ^\n" + >+ "Javadoc: The field IY.y is deprecated\n" + >+ "----------\n"); > } > > public void test062() { >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java,v >retrieving revision 1.17 >diff -u -r1.17 JavadocTestForMethod.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java 20 May 2005 11:44:05 -0000 1.17 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java 9 Jun 2005 14:35:28 -0000 >@@ -115,27 +115,27 @@ > " void foo() {\n" + > " }\n" + > "}\n" }, >- "----------\n" + >- "1. ERROR in Z.java (at line 4)\n" + >- " * @see X#x\n" + >- " ^\n" + >- "Javadoc: The field X.x is deprecated\n" + >- "----------\n" + >- "2. ERROR in Z.java (at line 5)\n" + >- " * @see Y\n" + >- " ^\n" + >- "Javadoc: The type Y is deprecated\n" + >- "----------\n" + >- "3. ERROR in Z.java (at line 6)\n" + >- " * @see Y#y\n" + >- " ^\n" + >- "Javadoc: The type Y is deprecated\n" + >- "----------\n" + >- "4. ERROR in Z.java (at line 6)\n" + >- " * @see Y#y\n" + >- " ^\n" + >- "Javadoc: The field Y.y is deprecated\n" + >- "----------\n" >+ "----------\n" + >+ "1. WARNING in Z.java (at line 4)\n" + >+ " * @see X#x\n" + >+ " ^\n" + >+ "Javadoc: The field X.x is deprecated\n" + >+ "----------\n" + >+ "2. WARNING in Z.java (at line 5)\n" + >+ " * @see Y\n" + >+ " ^\n" + >+ "Javadoc: The type Y is deprecated\n" + >+ "----------\n" + >+ "3. WARNING in Z.java (at line 6)\n" + >+ " * @see Y#y\n" + >+ " ^\n" + >+ "Javadoc: The type Y is deprecated\n" + >+ "----------\n" + >+ "4. WARNING in Z.java (at line 6)\n" + >+ " * @see Y#y\n" + >+ " ^\n" + >+ "Javadoc: The field Y.y is deprecated\n" + >+ "----------\n" > ); > } > >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java,v >retrieving revision 1.10 >diff -u -r1.10 JavadocTestOptions.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java 8 Mar 2005 12:01:53 -0000 1.10 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java 9 Jun 2005 14:35:28 -0000 >@@ -10,6 +10,7 @@ > *******************************************************************************/ > package org.eclipse.jdt.core.tests.compiler.regression; > >+import java.util.HashMap; > import java.util.Map; > import java.util.StringTokenizer; > >@@ -255,7 +256,7 @@ > }; > > private static String[] resultForInvalidTagsClassOrField = { >- "1. ERROR in Y.java (at line 3)\n" + >+ "1. WARNING in Y.java (at line 3)\n" + > " * @see X.X_dep\n" + > " ^^^^^^^\n" + > "Javadoc: The type X.X_dep is deprecated\n" + >@@ -280,12 +281,12 @@ > " ^^^^^^^^^\n" + > "Javadoc: The constructor X(String) is undefined\n" + > "----------\n" + >- "6. ERROR in Y.java (at line 8)\n" + >+ "6. WARNING in Y.java (at line 8)\n" + > " * @see X#X()\n" + > " ^^^\n" + > "Javadoc: The constructor X() is deprecated\n" + > "----------\n" + >- "7. ERROR in Y.java (at line 9)\n" + >+ "7. WARNING in Y.java (at line 9)\n" + > " * @see X#x_dep\n" + > " ^^^^^\n" + > "Javadoc: The field X.x_dep is deprecated\n" + >@@ -300,7 +301,7 @@ > " ^^^^^^^\n" + > "Javadoc: unknown cannot be resolved or is not a field\n" + > "----------\n" + >- "10. ERROR in Y.java (at line 12)\n" + >+ "10. WARNING in Y.java (at line 12)\n" + > " * @see X#foo_dep()\n" + > " ^^^^^^^^^\n" + > "Javadoc: The method foo_dep() from the type X is deprecated\n" + >@@ -320,7 +321,7 @@ > " ^^^^^^^\n" + > "Javadoc: The method unknown() is undefined for the type X\n" + > "----------\n", >- "14. ERROR in Y.java (at line 19)\n" + >+ "14. WARNING in Y.java (at line 19)\n" + > " * @see X.X_dep\n" + > " ^^^^^^^\n" + > "Javadoc: The type X.X_dep is deprecated\n" + >@@ -345,12 +346,12 @@ > " ^^^^^^^^^\n" + > "Javadoc: The constructor X(String) is undefined\n" + > "----------\n" + >- "19. ERROR in Y.java (at line 24)\n" + >+ "19. WARNING in Y.java (at line 24)\n" + > " * @see X#X()\n" + > " ^^^\n" + > "Javadoc: The constructor X() is deprecated\n" + > "----------\n" + >- "20. ERROR in Y.java (at line 25)\n" + >+ "20. WARNING in Y.java (at line 25)\n" + > " * @see X#x_dep\n" + > " ^^^^^\n" + > "Javadoc: The field X.x_dep is deprecated\n" + >@@ -365,7 +366,7 @@ > " ^^^^^^^\n" + > "Javadoc: unknown cannot be resolved or is not a field\n" + > "----------\n" + >- "23. ERROR in Y.java (at line 28)\n" + >+ "23. WARNING in Y.java (at line 28)\n" + > " * @see X#foo_dep()\n" + > " ^^^^^^^^^\n" + > "Javadoc: The method foo_dep() from the type X is deprecated\n" + >@@ -385,7 +386,7 @@ > " ^^^^^^^\n" + > "Javadoc: The method unknown() is undefined for the type X\n" + > "----------\n", >- "27. ERROR in Y.java (at line 35)\n" + >+ "27. WARNING in Y.java (at line 35)\n" + > " * @see X.X_dep\n" + > " ^^^^^^^\n" + > "Javadoc: The type X.X_dep is deprecated\n" + >@@ -410,12 +411,12 @@ > " ^^^^^^^^^\n" + > "Javadoc: The constructor X(String) is undefined\n" + > "----------\n" + >- "32. ERROR in Y.java (at line 40)\n" + >+ "32. WARNING in Y.java (at line 40)\n" + > " * @see X#X()\n" + > " ^^^\n" + > "Javadoc: The constructor X() is deprecated\n" + > "----------\n" + >- "33. ERROR in Y.java (at line 41)\n" + >+ "33. WARNING in Y.java (at line 41)\n" + > " * @see X#x_dep\n" + > " ^^^^^\n" + > "Javadoc: The field X.x_dep is deprecated\n" + >@@ -430,7 +431,7 @@ > " ^^^^^^^\n" + > "Javadoc: unknown cannot be resolved or is not a field\n" + > "----------\n" + >- "36. ERROR in Y.java (at line 44)\n" + >+ "36. WARNING in Y.java (at line 44)\n" + > " * @see X#foo_dep()\n" + > " ^^^^^^^^^\n" + > "Javadoc: The method foo_dep() from the type X is deprecated\n" + >@@ -450,7 +451,7 @@ > " ^^^^^^^\n" + > "Javadoc: The method unknown() is undefined for the type X\n" + > "----------\n", >- "40. ERROR in Y.java (at line 51)\n" + >+ "40. WARNING in Y.java (at line 51)\n" + > " * @see X.X_dep\n" + > " ^^^^^^^\n" + > "Javadoc: The type X.X_dep is deprecated\n" + >@@ -475,12 +476,12 @@ > " ^^^^^^^^^\n" + > "Javadoc: The constructor X(String) is undefined\n" + > "----------\n" + >- "45. ERROR in Y.java (at line 56)\n" + >+ "45. WARNING in Y.java (at line 56)\n" + > " * @see X#X()\n" + > " ^^^\n" + > "Javadoc: The constructor X() is deprecated\n" + > "----------\n" + >- "46. ERROR in Y.java (at line 57)\n" + >+ "46. WARNING in Y.java (at line 57)\n" + > " * @see X#x_dep\n" + > " ^^^^^\n" + > "Javadoc: The field X.x_dep is deprecated\n" + >@@ -495,7 +496,7 @@ > " ^^^^^^^\n" + > "Javadoc: unknown cannot be resolved or is not a field\n" + > "----------\n" + >- "49. ERROR in Y.java (at line 60)\n" + >+ "49. WARNING in Y.java (at line 60)\n" + > " * @see X#foo_dep()\n" + > " ^^^^^^^^^\n" + > "Javadoc: The method foo_dep() from the type X is deprecated\n" + >@@ -538,7 +539,7 @@ > " ^^^^^^^\n" + > "Javadoc: Unknown cannot be resolved to a type\n" + > "----------\n" + >- "5. ERROR in Y.java (at line 10)\n" + >+ "5. WARNING in Y.java (at line 10)\n" + > " * @see X.X_dep\n" + > " ^^^^^^^\n" + > "Javadoc: The type X.X_dep is deprecated\n" + >@@ -563,12 +564,12 @@ > " ^^^^^^^^^\n" + > "Javadoc: The constructor X(String) is undefined\n" + > "----------\n" + >- "10. ERROR in Y.java (at line 15)\n" + >+ "10. WARNING in Y.java (at line 15)\n" + > " * @see X#X()\n" + > " ^^^\n" + > "Javadoc: The constructor X() is deprecated\n" + > "----------\n" + >- "11. ERROR in Y.java (at line 16)\n" + >+ "11. WARNING in Y.java (at line 16)\n" + > " * @see X#x_dep\n" + > " ^^^^^\n" + > "Javadoc: The field X.x_dep is deprecated\n" + >@@ -583,7 +584,7 @@ > " ^^^^^^^\n" + > "Javadoc: unknown cannot be resolved or is not a field\n" + > "----------\n" + >- "14. ERROR in Y.java (at line 19)\n" + >+ "14. WARNING in Y.java (at line 19)\n" + > " * @see X#foo_dep()\n" + > " ^^^^^^^^^\n" + > "Javadoc: The method foo_dep() from the type X is deprecated\n" + >@@ -623,7 +624,7 @@ > " ^^^^^^^\n" + > "Javadoc: Unknown cannot be resolved to a type\n" + > "----------\n" + >- "22. ERROR in Y.java (at line 33)\n" + >+ "22. WARNING in Y.java (at line 33)\n" + > " * @see X.X_dep\n" + > " ^^^^^^^\n" + > "Javadoc: The type X.X_dep is deprecated\n" + >@@ -648,12 +649,12 @@ > " ^^^^^^^^^\n" + > "Javadoc: The constructor X(String) is undefined\n" + > "----------\n" + >- "27. ERROR in Y.java (at line 38)\n" + >+ "27. WARNING in Y.java (at line 38)\n" + > " * @see X#X()\n" + > " ^^^\n" + > "Javadoc: The constructor X() is deprecated\n" + > "----------\n" + >- "28. ERROR in Y.java (at line 39)\n" + >+ "28. WARNING in Y.java (at line 39)\n" + > " * @see X#x_dep\n" + > " ^^^^^\n" + > "Javadoc: The field X.x_dep is deprecated\n" + >@@ -668,7 +669,7 @@ > " ^^^^^^^\n" + > "Javadoc: unknown cannot be resolved or is not a field\n" + > "----------\n" + >- "31. ERROR in Y.java (at line 42)\n" + >+ "31. WARNING in Y.java (at line 42)\n" + > " * @see X#foo_dep()\n" + > " ^^^^^^^^^\n" + > "Javadoc: The method foo_dep() from the type X is deprecated\n" + >@@ -708,7 +709,7 @@ > " ^^^^^^^\n" + > "Javadoc: Unknown cannot be resolved to a type\n" + > "----------\n" + >- "39. ERROR in Y.java (at line 56)\n" + >+ "39. WARNING in Y.java (at line 56)\n" + > " * @see X.X_dep\n" + > " ^^^^^^^\n" + > "Javadoc: The type X.X_dep is deprecated\n" + >@@ -733,12 +734,12 @@ > " ^^^^^^^^^\n" + > "Javadoc: The constructor X(String) is undefined\n" + > "----------\n" + >- "44. ERROR in Y.java (at line 61)\n" + >+ "44. WARNING in Y.java (at line 61)\n" + > " * @see X#X()\n" + > " ^^^\n" + > "Javadoc: The constructor X() is deprecated\n" + > "----------\n" + >- "45. ERROR in Y.java (at line 62)\n" + >+ "45. WARNING in Y.java (at line 62)\n" + > " * @see X#x_dep\n" + > " ^^^^^\n" + > "Javadoc: The field X.x_dep is deprecated\n" + >@@ -753,7 +754,7 @@ > " ^^^^^^^\n" + > "Javadoc: unknown cannot be resolved or is not a field\n" + > "----------\n" + >- "48. ERROR in Y.java (at line 65)\n" + >+ "48. WARNING in Y.java (at line 65)\n" + > " * @see X#foo_dep()\n" + > " ^^^^^^^^^\n" + > "Javadoc: The method foo_dep() from the type X is deprecated\n" + >@@ -793,7 +794,7 @@ > " ^^^^^^^\n" + > "Javadoc: Unknown cannot be resolved to a type\n" + > "----------\n" + >- "56. ERROR in Y.java (at line 79)\n" + >+ "56. WARNING in Y.java (at line 79)\n" + > " * @see X.X_dep\n" + > " ^^^^^^^\n" + > "Javadoc: The type X.X_dep is deprecated\n" + >@@ -818,12 +819,12 @@ > " ^^^^^^^^^\n" + > "Javadoc: The constructor X(String) is undefined\n" + > "----------\n" + >- "61. ERROR in Y.java (at line 84)\n" + >+ "61. WARNING in Y.java (at line 84)\n" + > " * @see X#X()\n" + > " ^^^\n" + > "Javadoc: The constructor X() is deprecated\n" + > "----------\n" + >- "62. ERROR in Y.java (at line 85)\n" + >+ "62. WARNING in Y.java (at line 85)\n" + > " * @see X#x_dep\n" + > " ^^^^^\n" + > "Javadoc: The field X.x_dep is deprecated\n" + >@@ -838,7 +839,7 @@ > " ^^^^^^^\n" + > "Javadoc: unknown cannot be resolved or is not a field\n" + > "----------\n" + >- "65. ERROR in Y.java (at line 88)\n" + >+ "65. WARNING in Y.java (at line 88)\n" + > " * @see X#foo_dep()\n" + > " ^^^^^^^^^\n" + > "Javadoc: The method foo_dep() from the type X is deprecated\n" + >@@ -1382,6 +1383,88 @@ > runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY)); > } > >+ // Test invalid javadoc "error" + tags "enabled" and visibility "public" - one test to raise the severity >+ // Side effect of https://bugs.eclipse.org/bugs/show_bug.cgi?id=76266. >+ public void testInvalidTagsClassErrorTagsPublicDeprecatedReferenceError() { >+ reportInvalidJavadoc = CompilerOptions.ERROR; >+ reportInvalidJavadocTags = CompilerOptions.ENABLED; >+ reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC; >+ Map raiseDeprecationReduceInvalidJavadocSeverity = new HashMap(1); >+ raiseDeprecationReduceInvalidJavadocSeverity.put( >+ CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); >+ runNegativeTest( >+ InvalidReferencesClassJavadocComments, >+ "----------\n" + >+ "1. ERROR in Y.java (at line 3)\n" + >+ " * @see X.X_dep\n" + >+ " ^^^^^^^\n" + >+ "Javadoc: The type X.X_dep is deprecated\n" + >+ "----------\n" + >+ "2. ERROR in Y.java (at line 4)\n" + >+ " * @see X.X_priv\n" + >+ " ^^^^^^^^\n" + >+ "Javadoc: The type X.X_priv is not visible\n" + >+ "----------\n" + >+ "3. ERROR in Y.java (at line 5)\n" + >+ " * @see X.Unknown\n" + >+ " ^^^^^^^^^\n" + >+ "Javadoc: X.Unknown cannot be resolved to a type\n" + >+ "----------\n" + >+ "4. ERROR in Y.java (at line 6)\n" + >+ " * @see X#X(int)\n" + >+ " ^^^^^^\n" + >+ "Javadoc: The constructor X(int) is not visible\n" + >+ "----------\n" + >+ "5. ERROR in Y.java (at line 7)\n" + >+ " * @see X#X(String)\n" + >+ " ^^^^^^^^^\n" + >+ "Javadoc: The constructor X(String) is undefined\n" + >+ "----------\n" + >+ "6. ERROR in Y.java (at line 8)\n" + >+ " * @see X#X()\n" + >+ " ^^^\n" + >+ "Javadoc: The constructor X() is deprecated\n" + >+ "----------\n" + >+ "7. ERROR in Y.java (at line 9)\n" + >+ " * @see X#x_dep\n" + >+ " ^^^^^\n" + >+ "Javadoc: The field X.x_dep is deprecated\n" + >+ "----------\n" + >+ "8. ERROR in Y.java (at line 10)\n" + >+ " * @see X#x_priv\n" + >+ " ^^^^^^\n" + >+ "Javadoc: The field x_priv is not visible\n" + >+ "----------\n" + >+ "9. ERROR in Y.java (at line 11)\n" + >+ " * @see X#unknown\n" + >+ " ^^^^^^^\n" + >+ "Javadoc: unknown cannot be resolved or is not a field\n" + >+ "----------\n" + >+ "10. ERROR in Y.java (at line 12)\n" + >+ " * @see X#foo_dep()\n" + >+ " ^^^^^^^^^\n" + >+ "Javadoc: The method foo_dep() from the type X is deprecated\n" + >+ "----------\n" + >+ "11. ERROR in Y.java (at line 13)\n" + >+ " * @see X#foo_priv()\n" + >+ " ^^^^^^^^\n" + >+ "Javadoc: The method foo_priv() from the type X is not visible\n" + >+ "----------\n" + >+ "12. ERROR in Y.java (at line 14)\n" + >+ " * @see X#foo_dep(String)\n" + >+ " ^^^^^^^\n" + >+ "Javadoc: The method foo_dep() in the type X is not applicable for the arguments (String)\n" + >+ "----------\n" + >+ "13. ERROR in Y.java (at line 15)\n" + >+ " * @see X#unknown()\n" + >+ " ^^^^^^^\n" + >+ "Javadoc: The method unknown() is undefined for the type X\n" + >+ "----------\n", >+ null, >+ true, >+ raiseDeprecationReduceInvalidJavadocSeverity); >+ } >+ > // Test invalid javadoc "error" + tags "enabled" and visibility "protected" > public void testInvalidTagsClassErrorTagsProtected() { > reportInvalidJavadoc = CompilerOptions.ERROR;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 76266
:
22702
|
22703
|
22704
|
32416