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 118571 Details for
Bug 254825
[javadoc] compile error when referencing outer param from inner class javadoc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
New proposed patch
v01.txt (text/plain), 3.19 KB, created by
Frederic Fusier
on 2008-11-24 05:20:04 EST
(
hide
)
Description:
New proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2008-11-24 05:20:04 EST
Size:
3.19 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.56 >diff -u -r1.56 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 12 Sep 2008 16:38:57 -0000 1.56 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 24 Nov 2008 10:18:57 -0000 >@@ -8163,4 +8163,48 @@ > } > ); > } >+ >+/** >+ * @bug 254825: [javadoc] compile error when referencing outer param from inner class javadoc >+ * @test Ensure that local variable reference does not imply missing compiler implementation error >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=254825" >+ */ >+public void testBug254825() { >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "class X {\n" + >+ " public Object foo(Object o) { \n" + >+ " return new Object() {\n" + >+ " /** @see #o */\n" + >+ " public void x() {}\n" + >+ " };\n" + >+ " }\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 4)\n" + >+ " /** @see #o */\n" + >+ " ^\n" + >+ "Javadoc: o cannot be resolved or is not a field\n" + >+ "----------\n" >+ ); >+} >+public void testBug254825b() { >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "class X {\n" + >+ " /** @see #o */\n" + >+ " public Object foo(Object o) {}\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 2)\n" + >+ " /** @see #o */\n" + >+ " ^\n" + >+ "Javadoc: o cannot be resolved or is not a field\n" + >+ "----------\n" >+ ); >+} > } >\ No newline at end of file >#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.30 >diff -u -r1.30 JavadocFieldReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 25 Sep 2008 23:10:29 -0000 1.30 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 24 Nov 2008 10:18:58 -0000 >@@ -82,6 +82,11 @@ > } else { > ProblemMethodBinding problemMethodBinding = (ProblemMethodBinding) possibleMethod; > if (problemMethodBinding.closestMatch == null) { >+ if (fieldBinding.isValidBinding()) { >+ // When the binding is not on a field (e.g. local variable), we need to create a problem field binding to report the correct problem >+ // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=254825 >+ fieldBinding = new ProblemFieldBinding(refBinding, fieldBinding.readableName(), ProblemReasons.NotFound); >+ } > scope.problemReporter().javadocInvalidField(this, fieldBinding, this.actualReceiverType, scope.getDeclarationModifiers()); > } else { > this.methodBinding = problemMethodBinding.closestMatch;
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 254825
:
118039
| 118571