Bug 51226 - Javadoc inside DOM AST does not support starting characters in unicode
Summary: Javadoc inside DOM AST does not support starting characters in unicode
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-05 05:47 EST by David Audel CLA
Modified: 2004-02-11 11:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2004-02-05 05:47:31 EST
build 20040229
-------------------
/*\u002A
 * Test
 */
public class X {
}
-------------------
\u002A is * character

The DOM Javadoc of this test case seems not correct
Javadoc
+TagElement
 +TextElement '02A'
 +TextElement 'Test'
Comment 1 Frederic Fusier CLA 2004-02-05 05:49:43 EST
In fact this is only when unicode is on one of the three starting character 
(e.g. '/', first '*' or second '*'). Otherwise, unicode is correctly handled 
inside javadoc comment...
Comment 2 Frederic Fusier CLA 2004-02-05 10:41:09 EST
Fixed.

Now javadoc comments which have unicode in starting (or ending) characters) are 
correctly parsed and DOM AST nodes hierarchy matches content.

[jdt-dev internal]
Changes applied in parse(int,int) method of AbstractCommentParser. In initial 
implementation, we started parse at javadoc start position + 3. It was enough 
before as we didn't store text. But because now we store all characters, it's 
really important to start _precisely_ after the starting characters '/**'.
Use readChar() three times to be sure of parse starting point...

Test cases added in jdt.core.dom.tests.ASTConverterJavadocTest
Comment 3 David Audel CLA 2004-02-11 11:55:12 EST
Verified for 3.0M7