Community
Participate
Working Groups
If I run 'format' on the following java code: package com.company.module; public class X { public X() { Object[] objects = new Object[] {}; } } I get: package com.company.module; public class X { public X() { Object[] objects = new Object[] { }; } } However, if I do it on the following code: public class X { public X() { Object[] objects = new Object[] {"x", "y"}; } } no change occurs (the ending bracket stays put). And if I do it for: public class X { public X() { Object[] objects = new Object[] {"x", "y" }; } } I get the bracket put back up as in the following: public class X { public X() { Object[] objects = new Object[] {"x", "y"}; } } I'm using the 11/19/2002 Eclipse 2.1 integration build. My code formatter settings are: ----from preference dialog---- { if (size < currentSize) { try { size = inStream.available(); } catch (IOException e) { } } else if (size == currentSize) { ++size; } else { --size; } } ----end---- I believe based on style guidelines the right bracket should stay put even for the empty array senario, since it isn't denoting a block of code.
We need to clear 2.1 bug reports that won't be addressed before 2.1. The new implementation is still in the works. Therefore we cannot include it for 2.1. Not enough testing and we need to polish the preferences. This will be address for 2.2 as stated in the JDT/Core plan.
Resurrecting for 3.0
does it work now ?
Fixed. Regression test added.
Verified.