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 77878 Details for
Bug 195374
[javadoc] Missing Javadoc warning for required qualification for inner types at 1.4 level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
[proposed patch + test case] on top v810 - all jdt.core tests OK
b195374_top_HEAD(v810)_v01.txt (text/plain), 3.54 KB, created by
Eric Jodet
on 2007-09-07 07:23:58 EDT
(
hide
)
Description:
[proposed patch + test case] on top v810 - all jdt.core tests OK
Filename:
MIME Type:
Creator:
Eric Jodet
Created:
2007-09-07 07:23:58 EDT
Size:
3.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java,v >retrieving revision 1.20 >diff -u -r1.20 JavadocArgumentExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java 6 Mar 2007 02:38:48 -0000 1.20 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java 7 Sep 2007 11:21:01 -0000 >@@ -41,6 +41,14 @@ > if (typeRef != null) { > this.resolvedType = typeRef.getTypeBinding(scope); > typeRef.resolvedType = this.resolvedType; >+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=195374 >+ // reproduce javadoc 1.3.1 / 1.4.2 behavior >+ if (typeRef instanceof SingleTypeReference && >+ this.resolvedType.leafComponentType().enclosingType() != null && >+ scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_4) { >+ scope.problemReporter().javadocInvalidMemberTypeQualification(this.sourceStart, this.sourceEnd, scope.getDeclarationModifiers()); >+ return null; >+ } > if (!this.resolvedType.isValidBinding()) { > scope.problemReporter().javadocInvalidType(typeRef, this.resolvedType, scope.getDeclarationModifiers()); > return null; >#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.36 >diff -u -r1.36 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 16 Mar 2007 18:31:22 -0000 1.36 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 7 Sep 2007 11:21:26 -0000 >@@ -5773,4 +5773,43 @@ > "Javadoc: Missing tag for parameter anotherInt\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" >+ */ >+ public void testBug195374() { >+ String[] units = new String[] { >+ "X.java", >+ "public class X {\n" + >+ " public static class Param {\n" + >+ " /**\n" + >+ " * warning expected when compliance < 1.5 {@link X#setParams(Param[])}\n" + >+ " * no warning expected {@link X#setParams(X.Param[])}\n" + >+ " */\n" + >+ " public int getIndex() {\n" + >+ " return 0;\n" + >+ " }\n" + >+ " }\n" + >+ " public void setParams(Param[] params) {\n" + >+ " }\n" + >+ "}\n" >+ }; >+ >+ String error14 = new String( >+ // warning - Tag @link: can't find setParams(Param[]) in X >+ "----------\n" + >+ "1. ERROR in X.java (at line 4)\n" + >+ " * warning expected when compliance < 1.5 {@link X#setParams(Param[])}\n" + >+ " ^^^^^^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n"); >+ this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC; >+ if (complianceLevel.equals(COMPLIANCE_1_3) || complianceLevel.equals(COMPLIANCE_1_4)) { >+ runNegativeTest(units,error14); >+ } >+ else { >+ runConformTest(units); >+ } >+ } > }
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 195374
:
77679
|
77695
| 77878