You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/10/18 14:41:21 UTC

svn commit: r1023767 - /commons/proper/collections/trunk/src/java/org/apache/commons/collections/CollectionUtils.java

Author: sebb
Date: Mon Oct 18 12:41:21 2010
New Revision: 1023767

URL: http://svn.apache.org/viewvc?rev=1023767&view=rev
Log:
Use explicit boxing/unboxing

Modified:
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/CollectionUtils.java

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/CollectionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/CollectionUtils.java?rev=1023767&r1=1023766&r2=1023767&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/CollectionUtils.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/CollectionUtils.java Mon Oct 18 12:41:21 2010
@@ -87,7 +87,7 @@ public class CollectionUtils {
         private final int getFreq(final Object obj, final Map<?, Integer> freqMap) {
             Integer count = freqMap.get(obj);
             if (count != null) {
-                return count;
+                return count.intValue();
             }
             return 0;
         }
@@ -293,9 +293,9 @@ public class CollectionUtils {
         for (O obj : coll) {
             Integer c = count.get(obj);
             if (c == null) {
-                count.put(obj, 1);
+                count.put(obj, Integer.valueOf(1));
             } else {
-                count.put(obj, c + 1);
+                count.put(obj, Integer.valueOf(c.intValue() + 1));
             }
         }
         return count;