classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Patch: convert new Boolean(X) to Boolean.valueOf(X)


From: Mark Wielaard
Subject: Re: [cp-patches] Patch: convert new Boolean(X) to Boolean.valueOf(X)
Date: Wed, 14 Sep 2005 12:47:01 +0200

On Wed, 2005-09-14 at 00:14 -0700, Anthony Green wrote:
> While messing around with FindBugs, I came up with the following useful
> patch.  It converts all "new Boolean(X)" instances to
> "Boolean.valueOf(X)".  Ok?
> [...]
> -      return new Boolean(true);
> +      return Boolean.valueOf(true);

OK, but if you know the actual value then using Boolean.TRUE and
Boolean.FALSE seems more appropriate then valueOf(). Could you make that
change?

Thanks,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]