cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: svn commit: r591599 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartParser.java
Date Sat, 03 Nov 2007 15:28:20 GMT
On 03.11.2007 7:30 Uhr, felixk@apache.org wrote:

> Author: felixk
> Date: Sat Nov  3 04:30:13 2007
> New Revision: 591599
> 
> URL: http://svn.apache.org/viewvc?rev=591599&view=rev
> Log:
> Method invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> 
> Creating new instances of java.lang.Boolean wastes memory, since Boolean objects are
immutable and there are only two useful values of this type.  Use the Boolean.valueOf() method
(or Java 1.5 autoboxing) to create Boolean objects instead.

Even better should be the usage of the constants Boolean.FALSE and 
Boolean.TRUE since the exact values are known beforehand.

Joerg

Mime
View raw message