My original intention was to point out that the code was much better
than the other way -- which I see all the time -- that can generate a
NPE easily:
if (System.getProperty(JKS_DB_PROPERTY).equals("true"))
Bill Shannon wrote:
> Abhijit Kumar wrote:
>
>> How about using Boolean.getBoolean(JKS_DB_PROPERTY)
>
>
> Much better!
>
> Or even
>
> if (System.getProperty(JKS_DB_PROPERTY,
> "false").equalsIgnoreCase("true"))
>
> Personally, I just *hate* the "if constant equals variable" style,
> even though I understand why people do it. I just find it very
> distracting when reading code.
>
> But we better not turn this into a coding style "discussion" or it
> will never end... :-)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>