Bug 198153 - [formatter] adds extra space before expanded numerical entity
Summary: [formatter] adds extra space before expanded numerical entity
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 3.3.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 197169
  Show dependency tree
 
Reported: 2007-07-27 15:05 EDT by Matt McCutchen CLA
Modified: 2008-09-16 09:46 EDT (History)
2 users (show)

See Also:


Attachments
Fix (867 bytes, patch)
2007-07-27 15:08 EDT, Matt McCutchen CLA
no flags Details | Diff
Add regression test (1.28 KB, patch)
2007-07-27 15:38 EDT, Matt McCutchen CLA
no flags Details | Diff
Add regression test (1.28 KB, patch)
2007-07-27 15:38 EDT, Matt McCutchen CLA
no flags Details | Diff

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