Bug 342455

Summary: AST swallows stars ('*') at end of {@code} and {@literal} Javadoc fragments
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, frederic_fusier, stephan.herrmann
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed fix + regression test none

Description Markus Keller CLA 2011-04-11 11:30:39 EDT
HEAD

AST swallows '*' at end of {@code} and {@literal} Javadoc fragments:

package p;

/**
 * Hello {@code stars*}.<br>
 * Bye {@literal stars****}.<br>
 * No stars*? Need {@code space* }?
 */
class A {	
}

In the last example, the * is preserved because there's another character after the * (can be any character, doesn't have to be a space).
Comment 1 Olivier Thomann CLA 2011-04-13 15:08:20 EDT
I think inside "inlined" tags everything between the {} must be selected.
Frédéric, do you see anything wrong with this ?
Comment 2 Frederic Fusier CLA 2011-04-13 15:11:48 EDT
(In reply to comment #1)
> I think inside "inlined" tags everything between the {} must be selected.
> Frédéric, do you see anything wrong with this ?

No, you're obviously right.
Comment 3 Olivier Thomann CLA 2011-04-13 15:18:04 EDT
Created attachment 193188 [details]
Proposed fix + regression test
Comment 4 Frederic Fusier CLA 2011-04-13 16:10:35 EDT
(In reply to comment #3)
> Created attachment 193188 [details]
> Proposed fix + regression test

Apparently looks ok... However, I wonder if that could not introduce a change in the formatter behavior. I'm running formatter massive regression tests to double-check...
Comment 5 Frederic Fusier CLA 2011-04-14 13:41:07 EDT
I didn't observe any behavior change while running massive formatter tests, hence +1 for the patch
Comment 6 Olivier Thomann CLA 2011-04-14 14:09:59 EDT
Thanks Frédéric.
Released for 3.7M7.
Comment 7 Stephan Herrmann CLA 2011-04-26 09:21:40 EDT
Verified for 3.7M7 using build I20110421-1800.