commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1163863 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Date Wed, 31 Aug 2011 23:09:14 GMT
Author: markt
Date: Wed Aug 31 23:09:13 2011
New Revision: 1163863

URL: http://svn.apache.org/viewvc?rev=1163863&view=rev
Log:
Stop multiple class to close() triggering an JMX error

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

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java?rev=1163863&r1=1163862&r2=1163863&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Wed Aug 31 23:09:13 2011
@@ -1005,7 +1005,10 @@ public class GenericObjectPool<T> extend
         super.close();
         clear();
         startEvictor(-1L);
-        ManagementFactory.getPlatformMBeanServer().unregisterMBean(oname);
+        if (oname != null) {
+            ManagementFactory.getPlatformMBeanServer().unregisterMBean(oname);
+            oname = null;
+        }
     }
 
     /**



Mime
View raw message