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 103553 Details for
Bug 207765
[javadoc] Javadoc warning on @see reference could be improved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[proposed patch + test case] on top v_872
v00.txt (text/plain), 3.35 KB, created by
Eric Jodet
on 2008-06-04 10:14:44 EDT
(
hide
)
Description:
[proposed patch + test case] on top v_872
Filename:
MIME Type:
Creator:
Eric Jodet
Created:
2008-06-04 10:14:44 EDT
Size:
3.35 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.44 >diff -u -r1.44 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 27 May 2008 23:54:01 -0000 1.44 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 4 Jun 2008 14:08:13 -0000 >@@ -7284,4 +7284,39 @@ > expectedError > ); > } >+ >+ /** >+ * @bug 207765: [javadoc] Javadoc warning on @see reference could be improved >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=207765" >+ */ >+ public void testBug207765() { >+ // ensure we have different message depending on tag value >+ String[] units = new String[] { >+ "pkg/X.java", >+ "package pkg;\n" + >+ "\n" + >+ "public class X {\n" + >+ " /**\n" + >+ " * {@link \"http://www.eclipse.org/}\n" + >+ " * @see \"http://www.eclipse.org/\n" + >+ " */\n" + >+ " public void foo() { \n" + >+ " \n" + >+ " }\n" + >+ "}\n" >+ }; >+ reportInvalidJavadoc = CompilerOptions.WARNING; >+ runNegativeTest(units, >+ "----------\n" + >+ "1. WARNING in pkg\\X.java (at line 5)\n" + >+ " * {@link \"http://www.eclipse.org/}\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "2. WARNING in pkg\\X.java (at line 6)\n" + >+ " * @see \"http://www.eclipse.org/\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid URL reference. Double quote the reference or use the href syntax\n" + >+ "----------\n"); >+ } > } >\ No newline at end of file >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java,v >retrieving revision 1.75 >diff -u -r1.75 AbstractCommentParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 15 May 2008 17:45:49 -0000 1.75 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 4 Jun 2008 14:08:15 -0000 >@@ -1151,7 +1151,15 @@ > } > char[] currentError = this.scanner.getCurrentIdentifierSource(); > if (currentError.length>0 && currentError[0] == '"') { >- if (this.reportProblems) this.sourceParser.problemReporter().javadocInvalidReference(this.scanner.getCurrentTokenStartPosition(), getTokenEndPosition()); >+ if (this.reportProblems) { >+ if (this.tagValue == TAG_SEE_VALUE) { >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=207765 >+ // handle invalid URL references in javadoc with dedicated message >+ this.sourceParser.problemReporter().javadocInvalidSeeUrlReference(this.scanner.getCurrentTokenStartPosition(), getTokenEndPosition()); >+ } else { >+ this.sourceParser.problemReporter().javadocInvalidReference(this.scanner.getCurrentTokenStartPosition(), getTokenEndPosition()); >+ } >+ } > return false; > } > break nextToken;
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 Raw
Actions:
View
Attachments on
bug 207765
:
103553
|
112436