commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1052753 - /commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolClientThread.java
Date Sat, 25 Dec 2010 05:31:18 GMT
Author: psteitz
Date: Sat Dec 25 05:31:18 2010
New Revision: 1052753

URL: http://svn.apache.org/viewvc?rev=1052753&view=rev
Log:
Avoid NPE gathering stats if borrowObject fails.

Modified:
    commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolClientThread.java

Modified: commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolClientThread.java
URL: http://svn.apache.org/viewvc/commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolClientThread.java?rev=1052753&r1=1052752&r2=1052753&view=diff
==============================================================================
--- commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolClientThread.java
(original)
+++ commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolClientThread.java
Sat Dec 25 05:31:18 2010
@@ -163,7 +163,10 @@ public class PoolClientThread extends Cl
                 numActiveStats.addValue(pool.getNumActive());
             }
         }
-        instanceIdleTimeStats.addValue(waiter.getLastIdleTimeMs());
+        if (waiter != null) {
+            instanceIdleTimeStats.addValue(waiter.getLastIdleTimeMs());
+        }
+        waiter = null;
     }
     
     protected void finish() throws Exception {



Mime
View raw message