Bug 302123 - [formatter] AssertionFailedException occurs while formatting a source containing the specific javadoc comment /** ***/
Summary: [formatter] AssertionFailedException occurs while formatting a source contain...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-08 06:52 EST by Frederic Fusier CLA
Modified: 2010-03-08 13:28 EST (History)
4 users (show)

See Also:


Attachments
Proposed patch (4.62 KB, patch)
2010-02-08 11:10 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 2010-02-08 06:52:37 EST
+++ This bug was initially created as a clone of Bug #300162 +++

Build Identifier: M20090917-0800

As said in bug 300162 comment 4, there's  first problem described in comment 0 is fixed in 3.6
since bug 294529 has been fixed...

However, there's still an AssertionFailedException while formatting the following simple test:

package format.test;

public class Test {
    public static void main(String[] args) {
        String s="X"+/** ***/"Y";
    }
}
Comment 1 Frederic Fusier CLA 2010-02-08 06:55:27 EST
The problem comes from the FormatterCommentParser which wrongly stores the first star of the 3 ending ones as the end of the javadoc text, although it should store the last star position instead...
Comment 2 Frederic Fusier CLA 2010-02-08 11:10:20 EST
Created attachment 158477 [details]
Proposed patch

The proposed solution is to not push the last text when there are contiguous stars at the end of the javadoc comment...
Comment 3 Frederic Fusier CLA 2010-02-09 03:59:16 EST
Released for 3.6M6 in HEAD stream.
Comment 4 Olivier Thomann CLA 2010-03-08 13:28:00 EST
Verified for 3.6M6 using I20100307-2000.