commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1391701 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java
Date Fri, 28 Sep 2012 23:59:55 GMT
Author: sebb
Date: Fri Sep 28 23:59:55 2012
New Revision: 1391701

URL: http://svn.apache.org/viewvc?rev=1391701&view=rev
Log:
There are only two distinct boolean values

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

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java?rev=1391701&r1=1391700&r2=1391701&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java Fri Sep
28 23:59:55 2012
@@ -5707,7 +5707,7 @@ public class ArrayUtils {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
-        HashMap<Boolean, MutableInt> occurrences = new HashMap<Boolean, MutableInt>(values.length);
+        HashMap<Boolean, MutableInt> occurrences = new HashMap<Boolean, MutableInt>(2);
// only two possible values here
         for (boolean v : values) {
             Boolean boxed = Boolean.valueOf(v);
             MutableInt count = occurrences.get(boxed);



Mime
View raw message