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 112174 Details for
Bug 246712
[javadoc] Unexpected warning about missing parameter doc in case of @inheritDoc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Additional patch to fix same issue on other tags
v02.txt (text/plain), 6.43 KB, created by
Frederic Fusier
on 2008-09-10 04:46:03 EDT
(
hide
)
Description:
Additional patch to fix same issue on other tags
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2008-09-10 04:46:03 EDT
Size:
6.43 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.50 >diff -u -r1.50 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 9 Sep 2008 19:03:12 -0000 1.50 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 10 Sep 2008 08:42:42 -0000 >@@ -7326,10 +7326,10 @@ > String[] units = new String[] { > "X.java", > "/**\n" + >- " * @author\n" + > " * {@code}\n" + >- " * @deprecated\n" + > " * {@literal}\n" + >+ " * @author\n" + >+ " * @deprecated\n" + > " * @since\n" + > " * @version\n" + > " * @generated\n" + // should not get a warning for missing description on non-standard tag >@@ -7359,25 +7359,25 @@ > runConformTest(true, units, > "----------\n" + > "1. WARNING in X.java (at line 2)\n" + >- " * @author\n" + >- " ^^^^^^\n" + >- "Javadoc: Description expected after @author\n" + >- "----------\n" + >- "2. WARNING in X.java (at line 3)\n" + > " * {@code}\n" + > " ^^^^\n" + > "Javadoc: Description expected after @code\n" + > "----------\n" + >+ "2. WARNING in X.java (at line 3)\n" + >+ " * {@literal}\n" + >+ " ^^^^^^^\n" + >+ "Javadoc: Description expected after @literal\n" + >+ "----------\n" + > "3. WARNING in X.java (at line 4)\n" + >+ " * @author\n" + >+ " ^^^^^^\n" + >+ "Javadoc: Description expected after @author\n" + >+ "----------\n" + >+ "4. WARNING in X.java (at line 5)\n" + > " * @deprecated\n" + > " ^^^^^^^^^^\n" + > "Javadoc: Description expected after @deprecated\n" + > "----------\n" + >- "4. WARNING in X.java (at line 5)\n" + >- " * {@literal}\n" + >- " ^^^^^^^\n" + >- "Javadoc: Description expected after @literal\n" + >- "----------\n" + > "5. WARNING in X.java (at line 6)\n" + > " * @since\n" + > " ^^^^^\n" + >@@ -7566,6 +7566,35 @@ > } > ); > } >+public void testBug246712b() { >+ this.reportMissingJavadocDescription = CompilerOptions.ALL_STANDARD_TAGS; >+ runConformTest( >+ new String[] { >+ "src/X.java", >+ "/**\n" + >+ " * @author {@link String}\n" + >+ " * @since {@link String}\n" + >+ " * @version {@link String}\n" + >+ " * @deprecated {@link String}\n" + >+ "*/\n" + >+ "public class X {\n" + >+ " /**\n" + >+ " * @return {@link String}\n" + >+ " * @since {@link String}\n" + >+ " * @throws Exception {@link String}\n" + >+ " * @exception Exception {@link String}\n" + >+ " * @serial {@link String}\n" + >+ " * @serialData {@link String}\n" + >+ " * @serialField {@link String}\n" + >+ " * @deprecated {@link String}\n" + >+ " */\n" + >+ " public String foo(String aParam) throws Exception {\n" + >+ " return new String();\n" + >+ " }\n" + >+ "}" >+ } >+ ); >+} > // duplicate > public void testBug246715() { > this.reportMissingJavadocDescription = CompilerOptions.ALL_STANDARD_TAGS; >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java,v >retrieving revision 1.73 >diff -u -r1.73 JavadocParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 9 Sep 2008 19:03:16 -0000 1.73 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 10 Sep 2008 08:42:43 -0000 >@@ -407,11 +407,13 @@ > > protected boolean parseTag(int previousPosition) throws InvalidInputException { > >- // Signal tag missing description if necessary >+ // Complain when tag is missing a description >+ // Note that if the parse of an inline tag has already started, consider it >+ // as the expected description, hence do not report any warning > switch (this.tagWaitingForDescription) { > case TAG_PARAM_VALUE: > case TAG_THROWS_VALUE: >- if (!this.inlineTagStarted) { // if an inline tag is started, then consider as the expected description... >+ if (!this.inlineTagStarted) { > int start = (int) (this.identifierPositionStack[0] >>> 32); > int end = (int) this.identifierPositionStack[this.identifierPtr]; > this.sourceParser.problemReporter().javadocMissingTagDescriptionAfterReference(start, end, this.sourceParser.modifiers); >@@ -420,7 +422,9 @@ > case NO_TAG_VALUE: > break; > default: >- this.sourceParser.problemReporter().javadocMissingTagDescription(TAG_NAMES[this.tagWaitingForDescription], this.tagSourceStart, this.tagSourceEnd, this.sourceParser.modifiers); >+ if (!this.inlineTagStarted) { >+ this.sourceParser.problemReporter().javadocMissingTagDescription(TAG_NAMES[this.tagWaitingForDescription], this.tagSourceStart, this.tagSourceEnd, this.sourceParser.modifiers); >+ } > break; > } > this.tagWaitingForDescription = NO_TAG_VALUE; >@@ -835,11 +839,13 @@ > */ > protected void updateDocComment() { > >- // Signal tag missing description if necessary >+ // Complain when tag is missing a description >+ // Note that if the parse of an inline tag has already started, consider it >+ // as the expected description, hence do not report any warning > switch (this.tagWaitingForDescription) { > case TAG_PARAM_VALUE: > case TAG_THROWS_VALUE: >- if (!this.inlineTagStarted) { // if an inline tag is started, then consider as the expected description... >+ if (!this.inlineTagStarted) { > int start = (int) (this.identifierPositionStack[0] >>> 32); > int end = (int) this.identifierPositionStack[this.identifierPtr]; > this.sourceParser.problemReporter().javadocMissingTagDescriptionAfterReference(start, end, this.sourceParser.modifiers); >@@ -848,7 +854,9 @@ > case NO_TAG_VALUE: > break; > default: >- this.sourceParser.problemReporter().javadocMissingTagDescription(TAG_NAMES[this.tagWaitingForDescription], this.tagSourceStart, this.tagSourceEnd, this.sourceParser.modifiers); >+ if (!this.inlineTagStarted) { >+ this.sourceParser.problemReporter().javadocMissingTagDescription(TAG_NAMES[this.tagWaitingForDescription], this.tagSourceStart, this.tagSourceEnd, this.sourceParser.modifiers); >+ } > break; > } > this.tagWaitingForDescription = NO_TAG_VALUE;
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 246712
:
112119
| 112174