commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r230715 - /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java
Date Mon, 08 Aug 2005 00:05:23 GMT
Author: ggregory
Date: Sun Aug  7 17:05:21 2005
New Revision: 230715

URL: http://svn.apache.org/viewcvs?rev=230715&view=rev
Log:
Fix PMD warning: Avoid instantiating Boolean objects; you can usually invoke Boolean.TRUE
instead.

Modified:
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java?rev=230715&r1=230714&r2=230715&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java Sun
Aug  7 17:05:21 2005
@@ -3463,7 +3463,7 @@
      * (index < 0 || index > array.length).
      */
     public static boolean[] add(boolean[] array, int index, boolean element) {
-        return (boolean[]) add( array, index, new Boolean(element), Boolean.TYPE );
+        return (boolean[]) add( array, index, BooleanUtils.toBooleanObject(element), Boolean.TYPE
);
     }
     
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message