diff --git a/src/java/org/apache/commons/collections/CollectionUtils.java b/src/java/org/apache/commons/collections/CollectionUtils.java index 67358b024..29d2461b9 100644 --- a/src/java/org/apache/commons/collections/CollectionUtils.java +++ b/src/java/org/apache/commons/collections/CollectionUtils.java @@ -87,7 +87,7 @@ public class CollectionUtils { private final int getFreq(final Object obj, final Map 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;