admin@glassfish.java.net

Re: CODE REVIEW: FindBugs: admin/validator/src/java/com/sun/enterprise/config/serverbeans/validation/Result.java

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Fri, 04 May 2007 10:43:17 -0700

Kedar Mhaswade wrote:
>
>>> - boolean debug = false;
>>> + final boolean debug = false;
>>
>> There doesn't seem to be any actual use of debug, why not just remove it?
> I agree. Plus there is no way to debug the code without actually
> recompiling code
> with this variable set to true.
>
> A better way to do this is: private final boolean debug =
> Boolean.getBoolean("debug");
>
> Unfortunately, we have this pattern in code at several places ...

Shouldn't that generally be replaced by use of a Logger?