Bug 198153

Summary: [formatter] adds extra space before expanded numerical entity
Product: [Eclipse Project] JDT Reporter: Matt McCutchen <hashproduct+eclipse>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: david_audel, jerome_lanneluc
Version: 3.3Keywords: contributed
Target Milestone: 3.3.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 197169    
Attachments:
Description Flags
Fix
none
Add regression test
none
Add regression test none

Description Matt McCutchen CLA 2007-07-27 15:05:25 EDT
Build ID: HEAD as of 7/27/2007

In some cases, when the Java formatter expands a numerical HTML entity, it inserts a space before the entity.  It shouldn't insert the space.

Steps To Reproduce:
1. Format the following code:

/**
 * <pre>
 * System.out.println(&#34;hello world&#34;);
 * </pre>
 */
public class Foo {
}

2. Note the space after "world".
Comment 1 Matt McCutchen CLA 2007-07-27 15:08:52 EDT
Created attachment 74825 [details]
Fix
Comment 2 Matt McCutchen CLA 2007-07-27 15:38:03 EDT
Created attachment 74830 [details]
Add regression test
Comment 3 Matt McCutchen CLA 2007-07-27 15:38:23 EDT
Created attachment 74831 [details]
Add regression test
Comment 4 Matt McCutchen CLA 2007-07-27 15:39:30 EDT
Comment on attachment 74831 [details]
Add regression test

Sorry, I didn't mean to attach it twice.
Comment 5 Olivier Thomann CLA 2007-07-30 13:04:57 EDT
Patch looks good.
Thank you.
Released for 3.4M1.
Regression test added in org.eclipse.jdt.core.tests.formatter.comment.JavaDocTestCase#test198153
Comment 6 Matt McCutchen CLA 2007-07-30 13:54:37 EDT
Hm, I don't see either the fix or the test in the CVS repository using either pserver access or viewcvs.  Am I missing something?  I wonder if the replication of the developers' CVS repository to the public one is broken.
Comment 7 Olivier Thomann CLA 2007-07-30 13:56:50 EDT
I was about to release it when I realized that I forgot to run all JDT/UI tests.
As soon as the tests are done successfully, I'll release the code.
Comment 8 Frederic Fusier CLA 2007-08-07 07:17:29 EDT
Verified for 3.4M1 using build I20070806-1800.
Comment 9 Olivier Thomann CLA 2007-08-13 13:02:02 EDT
Jérôme,

The fix for this bug is also required to be backported for 3.3.1 in order to properly backport bug 109636.
+1 for 3.3.1 ?
Comment 10 Jerome Lanneluc CLA 2007-08-14 07:12:10 EDT
(In reply to comment #9)
> Jérôme,
> 
> The fix for this bug is also required to be backported for 3.3.1 in order to
> properly backport bug 109636.
> +1 for 3.3.1 ?
> 
+1 for backporting to 3.3.1
Comment 11 Olivier Thomann CLA 2007-08-14 10:56:50 EDT
Reopen for 3.3.1.
Comment 12 Olivier Thomann CLA 2007-08-14 11:08:39 EDT
Released for 3.3.1
Regression test added in
org.eclipse.jdt.core.tests.formatter.comment.JavaDocTestCase#test198153
Comment 13 David Audel CLA 2007-09-03 08:58:10 EDT
Verified for 3.3.1 using build M20070831-2000.