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 99014 Details for
Bug 191322
[javadoc] @see or @link reference to method without signature fails to resolve to base class method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Same fix than previous patch with additional test cases
v01.txt (text/plain), 4.62 KB, created by
Frederic Fusier
on 2008-05-07 04:04:34 EDT
(
hide
)
Description:
Same fix than previous patch with additional test cases
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2008-05-07 04:04:34 EDT
Size:
4.62 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java,v >retrieving revision 1.41 >diff -u -r1.41 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 29 Apr 2008 10:34:56 -0000 1.41 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 7 May 2008 08:03:01 -0000 >@@ -6089,6 +6089,92 @@ > } > > /** >+ * @bug 191322: [javadoc] Missing Javadoc warning for required qualification for inner types at 1.4 level >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=191322" >+ */ >+ public void testBug191322() { >+ runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " void foo() {}\n" + >+ " /**\n" + >+ " * {@link #foo}.\n" + >+ " * @see #foo\n" + >+ " */\n" + >+ " void goo() {}\n" + >+ "}\n", >+ "Y.java", >+ "class Y extends X {\n" + >+ " /**\n" + >+ " * {@link #foo}\n" + >+ " * @see #foo\n" + >+ " */\n" + >+ " void hoo() {}\n" + >+ "}" >+ } >+ ); >+ } >+ public void testBug191322b() { >+ runConformTest( >+ new String[] { >+ "b/X.java", >+ "package b;\n" + >+ "public class X {\n" + >+ " void foo() {}\n" + >+ "}\n" + >+ "class Y extends X {}\n" + >+ "class W extends Y {}\n" + >+ "class Z extends W {\n" + >+ " /**\n" + >+ " * {@link #foo}\n" + >+ " * @see #foo\n" + >+ " */\n" + >+ " void hoo() {}\n" + >+ "}\n" >+ } >+ ); >+ } >+ public void testBug191322c() { >+ runConformTest( >+ new String[] { >+ "c/X.java", >+ "package c;\n" + >+ "public interface X {\n" + >+ " void foo();\n" + >+ "}\n" + >+ "interface Y extends X {\n" + >+ " /**\n" + >+ " * {@link #foo}\n" + >+ " * @see #foo\n" + >+ " */\n" + >+ " void hoo();\n" + >+ "}\n" >+ } >+ ); >+ } >+ public void testBug191322d() { >+ runConformTest( >+ new String[] { >+ "d/X.java", >+ "package d;\n" + >+ "public interface X {\n" + >+ " void foo();\n" + >+ "}\n" + >+ "interface Y extends X {}\n" + >+ "abstract class W implements Y {}\n" + >+ "abstract class Z extends W {\n" + >+ " /**\n" + >+ " * {@link #foo}\n" + >+ " * @see #foo\n" + >+ " */\n" + >+ " void hoo() {}\n" + >+ "}\n" >+ } >+ ); >+ } >+ >+ /** > * @bug 195374: [javadoc] Missing Javadoc warning for required qualification for inner types at 1.4 level > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=195374" > */ >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java,v >retrieving revision 1.26 >diff -u -r1.26 JavadocFieldReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 22 Feb 2008 09:49:36 -0000 1.26 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 7 May 2008 08:03:03 -0000 >@@ -74,7 +74,7 @@ > } > if (this.receiverType instanceof ReferenceBinding) { > ReferenceBinding refBinding = (ReferenceBinding) this.receiverType; >- MethodBinding[] methodBindings = refBinding.getMethods(this.token); >+ MethodBinding[] methodBindings = findPossibleMethod(refBinding); > if (methodBindings == null) { > scope.problemReporter().javadocInvalidField(this, fieldBinding, this.receiverType, scope.getDeclarationModifiers()); > } else { >@@ -104,6 +104,22 @@ > } > return this.resolvedType = this.binding.type; > } >+ >+ private MethodBinding[] findPossibleMethod(ReferenceBinding refBinding) { >+ MethodBinding[] methodBindings = refBinding.getMethods(this.token); >+ if (methodBindings != Binding.NO_METHODS) return methodBindings; >+ ReferenceBinding[] superInterfaces = refBinding.superInterfaces(); >+ for (int i = 0, length = superInterfaces.length; i < length; ++i) { >+ methodBindings = findPossibleMethod(superInterfaces[i]); >+ if (methodBindings != Binding.NO_METHODS) { >+ return methodBindings; >+ } >+ } >+ if (refBinding.superclass() != null) { >+ return findPossibleMethod(refBinding.superclass()); >+ } >+ return Binding.NO_METHODS; >+ } > > public boolean isSuperAccess() { > return (this.bits & ASTNode.SuperAccess) != 0;
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 191322
:
98791
|
98794
|
98802
|
98964
|
99014
|
99047
|
99072