Mark Wielaard 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?
That shouldn't be necessary .. the method inliner will
likely take care of that (Boolean.valueOf() is guaranteed
to return either Boolean.TRUE or Boolean.FALSE) so the
ultimate effect should be the same.
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches