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 117195 Details for
Bug 253750
[javadoc] Compiler warning about never used imports when import is enum used in JavaDoc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
253750.txt (text/plain), 5.72 KB, created by
Philipe Mulet
on 2008-11-06 09:00:24 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2008-11-06 09:00:24 EST
Size:
5.72 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java,v >retrieving revision 1.61 >diff -u -r1.61 Javadoc.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 25 Sep 2008 23:10:29 -0000 1.61 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 6 Nov 2008 13:59:32 -0000 >@@ -776,13 +776,16 @@ > mainLoop: for (int i=0; i<length; i++) { > char[][] compoundName = imports[i].compoundName; > int compoundNameLength = compoundName.length; >- if ((imports[i].onDemand && compoundNameLength == computedCompoundName.length-1) || >- (compoundNameLength == computedCompoundName.length)) >- { >+ if ((imports[i].onDemand && compoundNameLength == computedCompoundName.length-1) >+ || (compoundNameLength == computedCompoundName.length)) { > for (int j = compoundNameLength; --j >= 0;) { > if (CharOperation.equals(imports[i].compoundName[j], computedCompoundName[j])) { > if (j == 0) { > hasValidImport = true; >+ ImportReference importReference = imports[i].reference; >+ if (importReference != null) { >+ importReference.bits |= ASTNode.Used; >+ } > break mainLoop; > } > } else { >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java,v >retrieving revision 1.20 >diff -u -r1.20 JavadocTestForClass.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java 27 Jun 2008 16:04:45 -0000 1.20 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java 6 Nov 2008 13:59:33 -0000 >@@ -14,6 +14,7 @@ > > import junit.framework.Test; > >+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; > > public class JavadocTestForClass extends JavadocTest { >@@ -997,4 +998,125 @@ > + " }\n" > + "}\n" }); > } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=253750 >+ public void testONLY_054() { >+ if (this.complianceLevel < ClassFileConstants.JDK1_5) { >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "import java.util.Map;\n" + >+ "import java.util.Map.Entry;\n" + >+ "\n" + >+ "/**\n" + >+ " * <ul>\n" + >+ " * <li> {@link Entry} </li>\n" + >+ " * </ul>\n" + >+ " */\n" + >+ "public interface X extends Map {\n" + >+ " int i;\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 6)\n" + >+ " * <li> {@link Entry} </li>\n" + >+ " ^^^^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n"); >+ return; >+ } >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "import java.util.Map;\n" + >+ "import java.util.Map.Entry;\n" + >+ "\n" + >+ "/**\n" + >+ " * <ul>\n" + >+ " * <li> {@link Entry} </li>\n" + >+ " * </ul>\n" + >+ " */\n" + >+ "public interface X extends Map {\n" + >+ " int i;\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 10)\n" + >+ " int i;\n" + >+ " ^\n" + >+ "The blank final field i may not have been initialized\n" + >+ "----------\n"); >+ } >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=253750 - variation >+ public void testONLY_055() { >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "import java.util.Map;\n" + >+ "\n" + >+ "/**\n" + >+ " * <ul>\n" + >+ " * <li> {@link Entry} </li>\n" + >+ " * </ul>\n" + >+ " */\n" + >+ "public interface X extends Map {\n" + >+ " Entry e = null;\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 5)\n" + >+ " * <li> {@link Entry} </li>\n" + >+ " ^^^^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n"); >+ } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=253750 >+ public void testONLY_056() { >+ if (this.complianceLevel < ClassFileConstants.JDK1_5) { >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "import java.util.Map;\n" + >+ "import java.util.Map.Entry;\n" + >+ "\n" + >+ "/**\n" + >+ " * <ul>\n" + >+ " * <li> {@link Entry} </li>\n" + >+ " * </ul>\n" + >+ " */\n" + >+ "public interface X extends Map {\n" + >+ " Entry e;\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 6)\n" + >+ " * <li> {@link Entry} </li>\n" + >+ " ^^^^^\n" + >+ "Javadoc: Invalid member type qualification\n" + >+ "----------\n"); >+ return; >+ } >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "import java.util.Map;\n" + >+ "import java.util.Map.Entry;\n" + >+ "\n" + >+ "/**\n" + >+ " * <ul>\n" + >+ " * <li> {@link Entry} </li>\n" + >+ " * </ul>\n" + >+ " */\n" + >+ "public interface X extends Map {\n" + >+ " Entry e;\n" + >+ "}\n", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 10)\n" + >+ " Entry e;\n" + >+ " ^\n" + >+ "The blank final field e may not have been initialized\n" + >+ "----------\n"); >+ } > }
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 253750
: 117195