Bug 148370 - [formatter] new Class<?>[] {} kills formatter
Summary: [formatter] new Class<?>[] {} kills formatter
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.3 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-23 07:23 EDT by Martijn van Steenbergen CLA
Modified: 2007-07-29 09:20 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (3.65 KB, patch)
2006-06-26 16:16 EDT, Olivier Thomann CLA
no flags Details | Diff
Regression tests (7.08 KB, patch)
2006-06-26 16:17 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 Martijn van Steenbergen CLA 2006-06-23 07:23:24 EDT
Eclipse DSK 3.2RC7
Build id: I20060602-1317

Create a new Java file with the following contents:

---
class Test {

	 Object classes = new Class<?>[] {};

}
---

Running the formatter no longer has any effect: try adding some code with bad layout, run the formatter and notice nothing happens.
Comment 1 Olivier Thomann CLA 2006-06-24 17:22:44 EDT
Philippe,

Candidate for 3.2.1?
Comment 2 Philipe Mulet CLA 2006-06-25 17:25:07 EDT
Depends on the fix... how long has this been broken ?
Comment 3 Olivier Thomann CLA 2006-06-26 10:12:22 EDT
Always been broken.
I am working on a fix. Could be 3.3 only.
Comment 4 Olivier Thomann CLA 2006-06-26 16:16:32 EDT
Created attachment 45328 [details]
Proposed fix
Comment 5 Olivier Thomann CLA 2006-06-26 16:17:19 EDT
Created attachment 45329 [details]
Regression tests
Comment 6 Olivier Thomann CLA 2006-06-27 13:22:17 EDT
Fixed and released in HEAD.
Regression tests added in org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests.test622/test623/test624
Comment 7 Martijn van Steenbergen CLA 2006-06-27 15:49:50 EDT
Thank you kindly for the quick fix. :-)
Comment 8 Olivier Thomann CLA 2006-06-28 11:05:57 EDT
Released for 3.3 M1
Comment 9 Frederic Fusier CLA 2006-08-08 04:36:52 EDT
Verified for 3.3 M1 using build I20060807-2000.
Comment 10 Eclipse Webmaster CLA 2007-07-29 09:20:25 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991