Bug 239607 - [formatter] Incorrect removal of asterisk (*) within a block comment when formatting
Summary: [formatter] Incorrect removal of asterisk (*) within a block comment when for...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.4.2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 260274 260276 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-04 08:43 EDT by AJ Brindley CLA
Modified: 2009-02-04 03:47 EST (History)
8 users (show)

See Also:
philippe_mulet: pmc_approved+


Attachments
Proposed patch for R3_4_maintenance stream (6.96 KB, patch)
2009-01-12 10:29 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 AJ Brindley CLA 2008-07-04 08:43:23 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1. Enter the following comment into a java document:

/**
 * This is *my* comment
 */ 

2. Format the document.
3. You should see the following:

/**
 * This ismy comment
 */ 

Expected comments to stay the same.

More information:
I have tried various settings in the formatter to stop this but could not.

This is a new issue in 3.4 and was correctly formatted in Eclipse 3.3.x
Comment 1 Frederic Fusier CLA 2008-08-20 11:46:24 EDT
I cannot reproduce using 3.4.0 (i.e. I20080617-2000). What are your formatter preferences: Eclipse built-in profile or do you have specific settings?
Comment 2 Nick Radov CLA 2008-10-17 21:03:09 EDT
I am also being affected by this bug. Here is my platform information.

Version: 3.4.0
Build id: I20080617-2000

I have the Java formatter profile set to "Sun Code Conventions for the Java Programming Language". Is that sufficient for you to reproduce the failure?
Comment 3 Frederic Fusier CLA 2009-01-09 07:46:51 EST
I understand why I could not reproduce the problem, The summary was correct but not the test case which was done with a Javadoc comment instead of a block comment...
Comment 4 Frederic Fusier CLA 2009-01-09 07:47:39 EST
*** Bug 260274 has been marked as a duplicate of this bug. ***
Comment 5 Frederic Fusier CLA 2009-01-09 10:11:51 EST
Fixed by the patch attached to bug 254998:
https://bugs.eclipse.org/bugs/attachment.cgi?id=122118

So, released for 3.5M5.
Comment 6 Frederic Fusier CLA 2009-01-12 10:29:58 EST
Created attachment 122271 [details]
Proposed patch for R3_4_maintenance stream
Comment 7 Jerome Lanneluc CLA 2009-01-13 09:45:49 EST
Request to backport to 3.4.2 since this bug causes data loss, this is a regression comparing to 3.3.x, and the fix is quite simple and safe.
Comment 8 Philipe Mulet CLA 2009-01-13 09:51:53 EST
+1 for 3.4.2. Any data loss is critical.
Comment 9 Frederic Fusier CLA 2009-01-13 12:31:14 EST
Released for 3.4.2
Comment 10 Frederic Fusier CLA 2009-01-13 12:40:46 EST
*** Bug 260276 has been marked as a duplicate of this bug. ***
Comment 11 Srikanth Sankaran CLA 2009-01-27 03:07:45 EST
Verified for 3.5M5 using I20090125-2000 build
Comment 12 David Audel CLA 2009-02-04 03:47:48 EST
Verified for 3.4.2 using M20090127-1710.