[Top][All Lists]
[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
signature.asc
Description: This is a digitally signed message part