quality@glassfish.java.net

Findbugs query ...

From: kedar <Kedar.Mhaswade_at_Sun.COM>
Date: Sat, 27 Jan 2007 18:30:53 -0800

I am essentially taking a short-cut when I ask
this question. So, sorry about it in advance ;)

I find that whenever code checks for a System Property
value to be true, it should prefer

if (Boolean.getBoolean(property)) to

all incarnations of

if ("true".equals(System.getProperty(property)).

(this itself is often missed by developers and the
potential null-pointer dereferencing alternative of
the above is more popular :) )

Is it possible for Findbugs to flag this as something
to look into? Sorry if it is already doing it.

Regards,
Kedar