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 112119 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]
Proposed patch
v01.txt (text/plain), 4.57 KB, created by
Frederic Fusier
on 2008-09-09 15:11:37 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2008-09-09 15:11:37 EDT
Size:
4.57 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.49 >diff -u -r1.49 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 2 Sep 2008 08:09:11 -0000 1.49 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 9 Sep 2008 16:39:07 -0000 >@@ -7316,6 +7316,7 @@ > "----------\n" > ); > } >+ > /** > * @bug 222902: [Javadoc] Missing description should not be warned in some cases > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=222902" >@@ -7523,4 +7524,66 @@ > } > ); > } >+ >+/** >+ * @bug 246712: [javadoc] Unexpected warning about missing parameter doc in case of @inheritDoc >+ * @test Ensure inline tag are considered as description >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=246712" >+ */ >+public void testBug246712() { >+ runConformTest( >+ new String[] { >+ "src/X.java", >+ "public class X {\n" + >+ "\n" + >+ " /**\n" + >+ " * Do something more.\n" + >+ " * \n" + >+ " * @param monitor The monitor\n" + >+ " * @return {@link String X}\n" + >+ " */\n" + >+ " String foo(Object monitor) {\n" + >+ " return \"X\";\n" + >+ " }\n" + >+ "}\n", >+ "src/Y.java", >+ "public class Y extends X {\n" + >+ "\n" + >+ " /**\n" + >+ " * Do something more.\n" + >+ " * \n" + >+ " * {@inheritDoc}\n" + >+ " * \n" + >+ " * @param monitor {@inheritDoc}\n" + >+ " * @return {@link String Y}\n" + >+ " */\n" + >+ " String foo(Object monitor) {\n" + >+ " return \"Y\";\n" + >+ " }\n" + >+ "}\n" >+ } >+ ); >+} >+// duplicate >+public void testBug246715() { >+ runConformTest( >+ new String[] { >+ "src/X.java", >+ "public class X {\n" + >+ "\n" + >+ " final static int WAIT_YES = 0;\n" + >+ " final static int WAIT_NO = 1;\n" + >+ " \n" + >+ " /**\n" + >+ " * Do something more.\n" + >+ " * \n" + >+ " * @param waitFlag {@link #WAIT_YES} or {@link #WAIT_NO}\n" + >+ " */\n" + >+ " String foo(int waitFlag) {\n" + >+ " return \"X\";\n" + >+ " }\n" + >+ "}\n" >+ } >+ ); >+} > } >\ No newline at end of file >#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.72 >diff -u -r1.72 JavadocParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 2 Sep 2008 08:09:13 -0000 1.72 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 9 Sep 2008 16:39:09 -0000 >@@ -411,9 +411,11 @@ > switch (this.tagWaitingForDescription) { > case TAG_PARAM_VALUE: > case TAG_THROWS_VALUE: >- int start = (int) (this.identifierPositionStack[0] >>> 32); >- int end = (int) this.identifierPositionStack[this.identifierPtr]; >- this.sourceParser.problemReporter().javadocMissingTagDescriptionAfterReference(start, end, this.sourceParser.modifiers); >+ if (!this.inlineTagStarted) { // if an inline tag is started, then consider it as the expected description... >+ int start = (int) (this.identifierPositionStack[0] >>> 32); >+ int end = (int) this.identifierPositionStack[this.identifierPtr]; >+ this.sourceParser.problemReporter().javadocMissingTagDescriptionAfterReference(start, end, this.sourceParser.modifiers); >+ } > break; > case NO_TAG_VALUE: > break; >@@ -837,9 +839,11 @@ > switch (this.tagWaitingForDescription) { > case TAG_PARAM_VALUE: > case TAG_THROWS_VALUE: >- int start = (int) (this.identifierPositionStack[0] >>> 32); >- int end = (int) this.identifierPositionStack[this.identifierPtr]; >- this.sourceParser.problemReporter().javadocMissingTagDescriptionAfterReference(start, end, this.sourceParser.modifiers); >+ if (!this.inlineTagStarted) { // if an inline tag is started, then consider it as the expected description... >+ int start = (int) (this.identifierPositionStack[0] >>> 32); >+ int end = (int) this.identifierPositionStack[this.identifierPtr]; >+ this.sourceParser.problemReporter().javadocMissingTagDescriptionAfterReference(start, end, this.sourceParser.modifiers); >+ } > break; > case NO_TAG_VALUE: > break;
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