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 85267 Details for
Bug 209936
[javadoc] Missing code implementation in the compiler on inner classes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
[proposed patch + test case] on top v829 - all jdt.core tests OK
patch_bug_209936_top_HEAD(v829)v08.txt (text/plain), 32.67 KB, created by
Eric Jodet
on 2007-12-14 08:29:04 EST
(
hide
)
Description:
[proposed patch + test case] on top v829 - all jdt.core tests OK
Filename:
MIME Type:
Creator:
Eric Jodet
Created:
2007-12-14 08:29:04 EST
Size:
32.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java,v >retrieving revision 1.35 >diff -u -r1.35 JavadocTest_1_5.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java 30 Nov 2007 17:01:57 -0000 1.35 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java 14 Dec 2007 13:26:29 -0000 >@@ -39,7 +39,7 @@ > static { > // TESTS_PREFIX = "testBug95521"; > // TESTS_NAMES = new String[] { "testBug209936" }; >-// TESTS_NUMBERS = new int[] { 101283 }; >+// TESTS_NUMBERS = new int[] { 209936 }; > // TESTS_RANGE = new int[] { 23, -1 }; > } > public static Test suite() { >@@ -3098,13 +3098,11 @@ > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936" > */ > public void testBug209936a() { >- reportMissingJavadocComments = CompilerOptions.IGNORE; >- reportMissingJavadocCommentsVisibility = CompilerOptions.IGNORE; >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; > runNegativeTest( > new String[] { > "p/X.java", > "package p;\n" + >- "\n" + > "public abstract class X extends Y {\n" + > " protected class A extends Member {\n" + > " /**\n" + >@@ -3115,14 +3113,11 @@ > "}", > "p/Y.java", > "package p;\n" + >- "\n" + > "import p1.Z;\n" + >- "\n" + > "public abstract class Y extends Z<Object> {\n" + > "}", > "p1/Z.java", > "package p1;\n" + >- "\n" + > "public abstract class Z<T> {\n" + > " protected class Member {\n" + > " protected void foo(Object source, Object data) {\n" + >@@ -3131,33 +3126,20 @@ > "}" > }, > "----------\n" + >- "1. ERROR in p\\X.java (at line 6)\n" + >+ "1. ERROR in p\\X.java (at line 5)\n" + > " * @see Member#foo(Object, Object)\n" + >- " ^^^\n" + >- "Javadoc: The method foo(Object, Object) from the type Z<T>.Member is not visible\n" + >- "----------\n" + >- "2. ERROR in p\\X.java (at line 8)\n" + >- " public void foo(Object source, Object data) {}\n" + >- " ^^^^^^\n" + >- "Javadoc: Missing tag for parameter source\n" + >- "----------\n" + >- "3. ERROR in p\\X.java (at line 8)\n" + >- " public void foo(Object source, Object data) {}\n" + >- " ^^^^\n" + >- "Javadoc: Missing tag for parameter data\n" + >+ " ^^^^^^\n" + >+ "Javadoc: Invalid member type qualification\n" + > "----------\n" > ); > } > > public void testBug209936b() { >- reportMissingJavadocTags = CompilerOptions.IGNORE; >- reportMissingJavadocComments = CompilerOptions.IGNORE; >- reportMissingJavadocCommentsVisibility = CompilerOptions.IGNORE; >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; > runNegativeTest( > new String[] { > "p/X.java", > "package p;\n" + >- "\n" + > "public abstract class X extends Y {\n" + > " protected class A extends Member {\n" + > " /**\n" + >@@ -3170,24 +3152,597 @@ > "package p;\n" + > "\n" + > "import p1.Z;\n" + >- "\n" + >- "public abstract class Y extends Z<Object> {\n" + >- "}", >+ "public abstract class Y extends Z<Object> {}", > "p1/Z.java", > "package p1;\n" + >- "\n" + > "public abstract class Z<T> {\n" + > " protected class Member {\n" + >- " protected void foo(Object source, Object data) {\n" + >- " }\n" + >+ " protected void foo(Object source, Object data) {}\n" + > " }\n" + > "}" > }, > "----------\n" + >- "1. ERROR in p\\X.java (at line 6)\n" + >+ "1. ERROR in p\\X.java (at line 5)\n" + > " * @see Member#foo(Object, Object)\n" + >- " ^^^\n" + >- "Javadoc: The method foo(Object, Object) from the type Z<T>.Member is not visible\n" + >+ " ^^^^^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_GenericMemberImplicitReference() { >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2<T> {\n" + >+ " public class A3<U> {\n" + >+ " public class A4<V> {\n" + >+ " public void foo(V v) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2<T> extends A2<T> {\n" + >+ " public class X3<U> extends A3<U> {\n" + >+ " public class X4<V> extends A4<V> {\n" + >+ " /**\n" + >+ // implicit type reference >+ " * @see #foo(Object)\n" + >+ " * @see #foo(V)\n" + >+ " */\n" + >+ " public void foo(V v) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 10)\n" + >+ " * @see #foo(V)\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type X.X1.X2.X3.X4 is not applicable for the arguments (V)\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_GenericMemberSingleReference() { >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2<T> {\n" + >+ " public class A3<U> {\n" + >+ " public class A4<V> {\n" + >+ " public void foo(V v) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2<T> extends A2<T> {\n" + >+ " public class X3<U> extends A3<U> {\n" + >+ " public class X4<V> extends A4<V> {\n" + >+ " /**\n" + >+ // single type reference >+ " * @see A4#foo(V)\n" + >+ " * @see A4#foo(Object)\n" + >+ " */\n" + >+ " public void myFoo(V v) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 9)\n" + >+ " * @see A4#foo(V)\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + >+ "----------\n" + >+ "2. ERROR in p2\\X.java (at line 10)\n" + >+ " * @see A4#foo(Object)\n" + >+ " ^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_GenericMemberQualifiedSingleReference() { >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2<T> {\n" + >+ " public class A3<U> {\n" + >+ " public class A4<V> {\n" + >+ " public void foo(V v) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2<T> extends A2<T> {\n" + >+ " public class X3<U> extends A3<U> {\n" + >+ " public class X4<V> extends A4<V> {\n" + >+ " /**\n" + >+ // qualified single type reference >+ " * @see A3.A4#foo(V)\n" + >+ " * @see A3.A4#foo(Object)\n" + >+ " */\n" + >+ " public void foo(V v) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 9)\n" + >+ " * @see A3.A4#foo(V)\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_GenericMemberFullyQualifiedSingleReference() { >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2<T> {\n" + >+ " public class A3<U> {\n" + >+ " public class A4<V> {\n" + >+ " public void foo(V v) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2<T> extends A2<T> {\n" + >+ " public class X3<U> extends A3<U> {\n" + >+ " public class X4<V> extends A4<V> {\n" + >+ " /**\n" + >+ // fully qualified type reference >+ " * @see A.A1.A2.A3.A4#foo(V)\n" + >+ " * @see A.A1.A2.A3.A4#foo(Object)\n" + >+ " */\n" + >+ " public void foo(V v) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 9)\n" + >+ " * @see A.A1.A2.A3.A4#foo(V)\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_MemberImplicitReference() { >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2<T> {\n" + >+ " public class A3<U> {\n" + >+ " public class A4 {\n" + >+ " public void foo(U u) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2<T> extends A2<T> {\n" + >+ " public class X3<U> extends A3<U> {\n" + >+ " public class X4 extends A4 {\n" + >+ " /**\n" + >+ // implicit reference >+ " * @see #foo(Object)\n" + >+ " * @see #foo(U u)\n" + >+ " */\n" + >+ " public void foo(U u) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 10)\r\n" + >+ " * @see #foo(U u)\r\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type X.X1.X2.X3.X4 is not applicable for the arguments (U)\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_MemberSingleReference1(){ >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2<T> {\n" + >+ " public class A3 {\n" + >+ " public class A4 {\n" + >+ " public void foo(T t) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2<T> extends A2<T> {\n" + >+ " public class X3 extends A3 {\n" + >+ " public class X4 extends A4 {\n" + >+ " /**\n" + >+ // single type reference >+ " * @see A4#foo(Object)\n" + >+ " * @see A4#foo(T)\n" + >+ " */\n" + >+ " public void foo(T t) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 9)\n" + >+ " * @see A4#foo(Object)\n" + >+ " ^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n" + >+ "2. ERROR in p2\\X.java (at line 10)\n" + >+ " * @see A4#foo(T)\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (T)\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_MemberSingleReference2(){ >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2 {\n" + >+ " public class A3 {\n" + >+ " public class A4 {\n" + >+ " public void foo(S s) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2 extends A2 {\n" + >+ " public class X3 extends A3 {\n" + >+ " public class X4 extends A4 {\n" + >+ " /**\n" + >+ // single type reference >+ " * @see A4#foo(Object)\n" + >+ " * @see A4#foo(S)\n" + >+ " */\n" + >+ " public void foo(S s) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 9)\n" + >+ " * @see A4#foo(Object)\n" + >+ " ^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n" + >+ "2. ERROR in p2\\X.java (at line 10)\n" + >+ " * @see A4#foo(S)\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (S)\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_MemberSingleReference3(){ >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A {\n" + >+ " public class A1 {\n" + >+ " public class A2<T> {\n" + >+ " public class A3 {\n" + >+ " public class A4 {\n" + >+ " public void foo(T t) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X extends A {\n" + >+ " public class X1 extends A1 {\n" + >+ " public class X2<T> extends A2<T> {\n" + >+ " public class X3 extends A3 {\n" + >+ " public class X4 extends A4 {\n" + >+ " /**\n" + >+ // single type reference >+ " * @see A4#foo(Object)\n" + >+ " * @see A4#foo(T)\n" + >+ " */\n" + >+ " public void foo(T t) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 9)\n" + >+ " * @see A4#foo(Object)\n" + >+ " ^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n" + >+ "2. ERROR in p2\\X.java (at line 10)\n" + >+ " * @see A4#foo(T)\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (T)\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_MemberSingleReference4(){ >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "public class A {\n" + >+ " public class A1 {\n" + >+ " public class A2<T> {\n" + >+ " public class A3 {\n" + >+ " public class A4 {\n" + >+ " public void foo(T t) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X extends A {\n" + >+ " public class X1 extends A1 {\n" + >+ " public class X2<T> extends A2<T> {\n" + >+ " public class X3 extends A3 {\n" + >+ " public class X4 extends A4 {\n" + >+ " /**\n" + >+ // single type reference >+ " * @see A4#foo(Object)\n" + >+ " * @see A4#foo(T)\n" + >+ " */\n" + >+ " public void foo(T t) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 9)\n" + >+ " * @see A4#foo(Object)\n" + >+ " ^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n" + >+ "2. ERROR in p2\\X.java (at line 10)\n" + >+ " * @see A4#foo(T)\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (T)\n" + >+ "----------\n" >+ ); >+ } >+ >+ public void testBug209936_MemberQualifiedSingleReference1() { >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runConformTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2 {\n" + >+ " public class A3 {\n" + >+ " public class A4 {\n" + >+ " public void foo(S s) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2 extends A2 {\n" + >+ " public class X3 extends A3 {\n" + >+ " public class X4 extends A4 {\n" + >+ " /**\n" + >+ // qualified single type reference >+ " * @see A3.A4#foo(Object)\n" + >+ " * @see A2.A3.A4#foo(Object)\n" + >+ " * @see A1.A2.A3.A4#foo(Object)\n" + >+ " */\n" + >+ " public void foo(S s) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ } >+ ); >+ } >+ >+ public void testBug209936_MemberQualifiedSingleReference2() { >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runConformTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "\n" + >+ "public class A<R> {\n" + >+ " public class A1<S> {\n" + >+ " public class A2 {\n" + >+ " public class A3 {\n" + >+ " public class A4 {\n" + >+ " public class A5 {\n" + >+ " public class A6 {\n" + >+ " public void foo(S s) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1<S> extends A1<S> {\n" + >+ " public class X2 extends A2 {\n" + >+ " public class X3 extends A3 {\n" + >+ " public class X4 extends A4 {\n" + >+ " public class X5 extends A5 {\n" + >+ " public class X6 extends A6 {\n" + >+ " /**\n" + >+ // qualified single type reference >+ " * @see A5.A6#foo(Object)\n" + >+ " * @see A4.A5.A6#foo(Object)\n" + >+ " */\n" + >+ " public void foo(S s) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ } >+ ); >+ } >+ >+ public void testBug209936_MemberFullyQualifiedSingleReference() { >+ this.reportMissingJavadocTags = CompilerOptions.IGNORE; >+ runNegativeTest( >+ new String[] { >+ "p1/A.java", >+ "package p1;\n" + >+ "\n" + >+ "public class A<R> {\n" + >+ " public class A1 {\n" + >+ " public class A2 {\n" + >+ " public class A3 {\n" + >+ " public class A4 {\n" + >+ " public void foo(R r) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ "p2/X.java", >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public class X<R> extends A<R> {\n" + >+ " public class X1 extends A1 {\n" + >+ " public class X2 extends A2 {\n" + >+ " public class X3 extends A3 {\n" + >+ " public class X4 extends A4 {\n" + >+ " /**\n" + >+ // fully qualified type reference >+ " * @see A.A1.A2.A3.A4#foo(Object)\n" + >+ " * @see A.A1.A2.A3.A4#foo(R)\n" + >+ " */\n" + >+ " public void foo(R r) {}\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\X.java (at line 10)\r\n" + >+ " * @see A.A1.A2.A3.A4#foo(R)\r\n" + >+ " ^^^\n" + >+ "Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (R)\n" + > "----------\n" > ); > } >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java,v >retrieving revision 1.75 >diff -u -r1.75 ASTConverterJavadocTest.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java 24 Nov 2006 13:33:37 -0000 1.75 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java 14 Dec 2007 13:26:31 -0000 >@@ -2418,9 +2418,11 @@ > IBinding binding = seeRef.resolveBinding(); > assertTrue("Wrong kind of binding", binding instanceof ITypeBinding); > ITypeBinding typeBinding = (ITypeBinding)binding; >- assertTrue(seeRef.toString()+" should have a generic type binding", typeBinding.isGenericType()); >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936 >+ // only have RawTypeBinding in Javadocs >+ assertFalse(seeRef.toString()+" should NOT have a generic type binding", typeBinding.isGenericType()); > assertFalse(seeRef.toString()+" should NOT have a parameterized type binding", typeBinding.isParameterizedType()); >- assertFalse(seeRef.toString()+" should NOT have a raw type binding", typeBinding.isRawType()); >+ assertTrue(seeRef.toString()+" should have a raw type binding", typeBinding.isRawType()); > // Get inline tag simple name reference in second tag > assertEquals("Invalid number of fragments for inline tag element: "+inlineTag, 1, inlineTag.fragments().size()); > node = (ASTNode) inlineTag.fragments().get(0); >@@ -2430,9 +2432,11 @@ > binding = linkRef.resolveBinding(); > assertTrue("Wrong kind of binding", binding instanceof ITypeBinding); > typeBinding = (ITypeBinding)binding; >- assertTrue(linkRef.toString()+" should have a generic type binding", typeBinding.isGenericType()); >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936 >+ // only have RawTypeBinding in Javadocs >+ assertFalse(linkRef.toString()+" should NOT have a generic type binding", typeBinding.isGenericType()); > assertFalse(linkRef.toString()+" should NOT have a parameterized type binding", typeBinding.isParameterizedType()); >- assertFalse(linkRef.toString()+" should NOT have a raw type binding", typeBinding.isRawType()); >+ assertTrue(linkRef.toString()+" should have a raw type binding", typeBinding.isRawType()); > } > } > >Index: src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java,v >retrieving revision 1.22 >diff -u -r1.22 JavadocBugsCompletionModelTest.java >--- src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java 14 May 2007 17:04:05 -0000 1.22 >+++ src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java 14 Dec 2007 13:26:31 -0000 >@@ -340,7 +340,7 @@ > "}"; > completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "meth"); > assertSortedResults( >- "method[METHOD_REF]{method(Object), Ljavadoc.bugs.BasicTestBugs<TS;>;, (TS;)V, method, (s), "+this.positions+R_DRICNRNS+"}" >+ "method[METHOD_REF]{method(Object), Ljavadoc.bugs.BasicTestBugs;, (Ljava.lang.Object;)V, method, (s), "+this.positions+R_DRICNRNS+"}" > ); > } > >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v >retrieving revision 1.364 >diff -u -r1.364 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 30 Nov 2007 17:02:40 -0000 1.364 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 14 Dec 2007 13:26:33 -0000 >@@ -4139,7 +4139,6 @@ > return; > } > break; >- case ProblemReasons.ReceiverTypeNotVisible: > case ProblemReasons.NotVisible : > id = IProblem.JavadocNotVisibleMethod; > break; >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java,v >retrieving revision 1.89 >diff -u -r1.89 LookupEnvironment.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 25 Oct 2007 10:44:09 -0000 1.89 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 14 Dec 2007 13:26:32 -0000 >@@ -961,6 +961,34 @@ > cachedInfo[index] = wildcard; > return wildcard; > } >+/** >+* Returns the given binding's raw type binding. >+* May retrieve and convert to raw types all parameterized enclosing types of the given TypeBinding. >+* @param type the TypeBinding to raw convert >+* @return TypeBinding the raw converted TypeBinding >+*/ >+public TypeBinding deepConvertToRawType(TypeBinding type) { >+ TypeBinding rawTypeBinding = convertToRawType(type); >+ if (!rawTypeBinding.isParameterizedType()) { >+ return rawTypeBinding; >+ } >+ char[][] memberTypesNames = new char[5][]; >+ int idx = -1; // member types level >+ while (rawTypeBinding.isParameterizedType()) { >+ TypeBinding enclosing = rawTypeBinding.enclosingType(); >+ if (enclosing == null) break; >+ if (++idx == memberTypesNames.length) { >+ System.arraycopy(memberTypesNames, 0, memberTypesNames = new char[memberTypesNames.length*2][], 0, idx); >+ } >+ memberTypesNames[idx] = rawTypeBinding.sourceName(); >+ rawTypeBinding = enclosing; >+ } >+ // raw convert all member types >+ for (int i=idx; i>=0; i--) { >+ rawTypeBinding = convertToRawType(((ReferenceBinding) rawTypeBinding).getMemberType(memberTypesNames[i])); >+ } >+ return rawTypeBinding; >+} > > /** > * Returns the access restriction associated to a given type, or null if none >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java,v >retrieving revision 1.33 >diff -u -r1.33 JavadocMessageSend.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java 27 Apr 2007 15:51:38 -0000 1.33 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java 14 Dec 2007 13:26:32 -0000 >@@ -78,7 +78,7 @@ > if (this.actualReceiverType == null) { > return null; > } >- this.actualReceiverType = scope.environment().convertToRawType(this.receiver.resolvedType); >+ > SourceTypeBinding enclosingType = scope.enclosingSourceType(); > if (enclosingType==null ? false : enclosingType.isCompatibleWith(this.actualReceiverType)) { > this.bits |= ASTNode.SuperAccess; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java,v >retrieving revision 1.21 >diff -u -r1.21 JavadocSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java 10 Apr 2007 19:03:10 -0000 1.21 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java 14 Dec 2007 13:26:32 -0000 >@@ -16,7 +16,6 @@ > import org.eclipse.jdt.internal.compiler.lookup.BlockScope; > import org.eclipse.jdt.internal.compiler.lookup.ClassScope; > import org.eclipse.jdt.internal.compiler.lookup.PackageBinding; >-import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding; > import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons; > import org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding; > import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; >@@ -57,9 +56,6 @@ > visitor.endVisit(this, scope); > } > >- /* >- * We need to modify resolving behavior to handle package references >- */ > TypeBinding internalResolveType(Scope scope) { > // handle the error here > this.constant = Constant.NotAConstant; >@@ -85,11 +81,11 @@ > return null; > } > if (isTypeUseDeprecated(this.resolvedType, scope)) >- reportDeprecatedType(this.resolvedType, scope); >- if (this.resolvedType instanceof ParameterizedTypeBinding) { >- this.resolvedType = ((ParameterizedTypeBinding)this.resolvedType).genericType(); >- } >- return this.resolvedType; >+ reportDeprecatedType(this.resolvedType, scope); >+ >+ // Convert the resolved type to raw type as all type references in javadoc >+ // have to be raw ones (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936) >+ return this.resolvedType = scope.environment().deepConvertToRawType(this.resolvedType); > } > > /* (non-Javadoc) >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java,v >retrieving revision 1.18 >diff -u -r1.18 JavadocQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java 10 Apr 2007 19:03:10 -0000 1.18 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java 14 Dec 2007 13:26:32 -0000 >@@ -16,7 +16,6 @@ > import org.eclipse.jdt.internal.compiler.lookup.BlockScope; > import org.eclipse.jdt.internal.compiler.lookup.ClassScope; > import org.eclipse.jdt.internal.compiler.lookup.PackageBinding; >-import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding; > import org.eclipse.jdt.internal.compiler.lookup.Scope; > import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; > >@@ -74,10 +73,10 @@ > } > if (isTypeUseDeprecated(this.resolvedType, scope)) > reportDeprecatedType(this.resolvedType, scope); >- if (this.resolvedType instanceof ParameterizedTypeBinding) { >- this.resolvedType = ((ParameterizedTypeBinding)this.resolvedType).genericType(); >- } >- return this.resolvedType; >+ >+ // Convert the resolved type to raw type as all type references in javadoc >+ // have to be raw ones (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936) >+ return this.resolvedType = scope.environment().deepConvertToRawType(this.resolvedType); > } > > public TypeBinding resolveType(BlockScope blockScope, boolean checkBounds) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java,v >retrieving revision 1.11 >diff -u -r1.11 JavadocImplicitTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java 6 Mar 2007 02:38:48 -0000 1.11 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java 14 Dec 2007 13:26:32 -0000 >@@ -76,7 +76,10 @@ > } > if (isTypeUseDeprecated(this.resolvedType, scope)) > reportDeprecatedType(this.resolvedType, scope); >- return this.resolvedType; >+ >+ // Convert the resolved type to raw type as all type references in javadoc >+ // have to be raw ones (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936) >+ return this.resolvedType = scope.environment().deepConvertToRawType(this.resolvedType); > } > > protected void reportInvalidType(Scope scope) {
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 209936
:
82960
|
84203
|
84710
|
85267
|
85366
|
86312
|
88878