From 342ac1462c364646387dd37f3b61c713645c42ed Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Mon, 18 Oct 2010 12:41:21 +0000 Subject: [PATCH] Use explicit boxing/unboxing git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1023767 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/collections/CollectionUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;