Bug 148370

Summary: [formatter] new Class<?>[] {} kills formatter
Product: [Eclipse Project] JDT Reporter: Martijn van Steenbergen <mvsteenbergen>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.2   
Target Milestone: 3.3 M1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Regression tests none

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