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

svn commit: r1022324 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java

Author: ggregory
Date: Wed Oct 13 23:28:21 2010
New Revision: 1022324

URL: http://svn.apache.org/viewvc?rev=1022324&view=rev
Log:
Implement findbugs recomendation: ... invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java?rev=1022324&r1=1022323&r2=1022324&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java Wed Oct 13 23:28:21 2010
@@ -434,10 +434,10 @@ public class StackKeyedObjectPool<K,V> e
     private void incrementActiveCount(K key) {
         _totActive++;
         Integer old = _activeCount.get(key);
-        if(null == old) {
-            _activeCount.put(key,new Integer(1));
+        if (null == old) {
+            _activeCount.put(key, Integer.valueOf(1));
         } else {
-            _activeCount.put(key,new Integer(old.intValue() + 1));
+            _activeCount.put(key, Integer.valueOf(old.intValue() + 1));
         }
     }
 
@@ -455,7 +455,7 @@ public class StackKeyedObjectPool<K,V> e
         } else if(active.intValue() <= 1) {
             _activeCount.remove(key);
         } else {
-            _activeCount.put(key, new Integer(active.intValue() - 1));
+            _activeCount.put(key, Integer.valueOf(active.intValue() - 1));
         }
     }