RFR 8037106: Optimize Arrays.asList(...).forEach

Ulf Zibis Ulf.Zibis at CoSoCo.de
Mon Mar 17 20:57:39 UTC 2014

Am 17.03.2014 17:08, schrieb mark.reinhold at oracle.com:
> 2014/3/17 1:41 -0700, paul.sandoz at oracle.com:
>> On Mar 15, 2014, at 12:17 AM, Ulf Zibis <Ulf.Zibis at CoSoCo.de> wrote:
>>> ...
>>> I more like the given style with less spaces:
>>> 3854                 for (int i=0; i<a.length; i++)
>>> It better visualizes the 3 parts of the for statement.
>> Subjectively that irritates my eyes :-) non-subjectively it is
>> inconsistently applied.

What you mean by inconsistently? In the JDK sources?

> It's also, well, just plain wrong.
> - Mark

You are correct from java code conventions.

But I'm wondering, why this "wrong" style is such popular, even in JDK, at least in older sources - 
where IDE-driven auto-formatting was not available ;-)
My only explanation: People think, it's better readable, it better visualizes the 3 parts of the for 

BTW: IIRC, in NetBeans both styles are configurable for auto-formatting.


Another similar case: https://bugs.openjdk.java.net/browse/JDK-6939278

More information about the core-libs-dev mailing list