review request 7172551

Kelly O'Hair kelly.ohair at
Mon Jun 11 22:55:34 UTC 2012

On Jun 11, 2012, at 5:44 AM, Tom Hawtin wrote:

> On 07/06/2012 21:39, Joe Darcy wrote:
>> I'd like to see some "()" on this line!
>> 470 ClassLoader cl = cc != null ? cc.getClassLoader() : null;
> It's `a==b ? c : d` is such an incredibly common idiom in Java, and generally unambiguous, that parentheses are unhelpful noise. Emphasising precedence with spacing is good. And I personally have a strong dislike of the double negative.

Just my 2 cents on this...

I agree with you on the double negative. But I like parens, and spaces are not a substitute all the time.
Parens can serve to clarify, and I find them more helpful than not, paren use would have to be pretty excessive for me to
complain about them.

Spaces can come and go if you use things like NetBeans format options and how you have the spacing options defined.


> 470 ClassLoader cl = cc==null ? null : cc.getClassLoader();
> Tom

More information about the core-libs-dev mailing list