Bug 237742 - [javadoc] Javadoc tag name validation is incorrect
Summary: [javadoc] Javadoc tag name validation is incorrect
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 267833
  Show dependency tree
 
Reported: 2008-06-19 03:02 EDT by Frederic Fusier CLA
Modified: 2009-03-10 09:52 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (23.01 KB, patch)
2009-02-16 13:01 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2008-06-19 03:02:46 EDT
Since bug 51660 fix, tag names with special characters are considered as invalid by the compiler (e.g. @tag!name). While trying to fix bug 237051, I looked a little bit closer at javadoc tool behavior and it seems that this implementation was definitely wrong! In fact except for '"' and '\' characters, all other ones are accepted as soon as they are defined in a specific doclet or using the -tag option (see http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#javadocoptions).

So, the current implementation in JavadocParser.parseTag(int) to fix bug 51660 has bugs (and honestly is really awful... :-( ) which caused some troubles for the comment formatter (see bug 237051). These troubles were fixed in 3.4.1 only in the FormatterCommentParser to limit the impact of the changes but this finally must be rewritten for 3.5 to implement the correct behavior and fix all potential issues of the current implementation for all comment parsers...
Comment 1 Frederic Fusier CLA 2009-02-16 13:01:52 EST
Created attachment 125804 [details]
Proposed patch
Comment 2 Frederic Fusier CLA 2009-02-16 13:02:31 EST
Released for 3.5M6 in HEAD stream.
Comment 3 Frederic Fusier CLA 2009-02-16 13:04:07 EST
Note that it seems that the '#' character is definitively considered as invalid by the javadoc tool, hence the compiler also continues to do so...
Comment 4 Jay Arthanareeswaran CLA 2009-03-10 04:42:58 EDT
Verified for 3.5M6 with build I20090309-0100