Bug 237742

Summary: [javadoc] Javadoc tag name validation is incorrect
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana
Version: 3.4   
Target Milestone: 3.5 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 267833    
Attachments:
Description Flags
Proposed patch none

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