Bug 51226

Summary: Javadoc inside DOM AST does not support starting characters in unicode
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M7   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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