Bug 342455 - AST swallows stars ('*') at end of {@code} and {@literal} Javadoc fragments
Summary: AST swallows stars ('*') at end of {@code} and {@literal} Javadoc fragments
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 11:30 EDT by Markus Keller CLA
Modified: 2011-04-26 09:21 EDT (History)
3 users (show)

See Also:


Attachments
Proposed fix + regression test (5.12 KB, patch)
2011-04-13 15:18 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.