commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1351164 - in /commons/proper/pool/trunk/src: changes/changes.xml main/java/org/apache/commons/pool2/impl/PooledObject.java
Date Sun, 17 Jun 2012 21:12:39 GMT
Author: markt
Date: Sun Jun 17 21:12:38 2012
New Revision: 1351164

URL: http://svn.apache.org/viewvc?rev=1351164&view=rev
Log:
POOL-220
Suppress FindBugs warning

Modified:
    commons/proper/pool/trunk/src/changes/changes.xml
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/PooledObject.java

Modified: commons/proper/pool/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/changes/changes.xml?rev=1351164&r1=1351163&r2=1351164&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/changes/changes.xml (original)
+++ commons/proper/pool/trunk/src/changes/changes.xml Sun Jun 17 21:12:38 2012
@@ -50,7 +50,10 @@ objects that have been borrowed from the
 numerous API changes to support these and other new features as well as to
 clarify behaviour and improve consistency across the API.">
     <action issue="POOL-221" dev="markt" type="fix" >
-      PooledObject.state does not need to be volatile.
+      PooledObject.state does not need to be volatile
+    </action>
+    <action issue="POOL-220" dev="markt" type="fix">
+      Suppress a FindBugs warning
     </action>
     <action issue="POOL-217" dev="markt" type="update"  due-to="sebb">
       Use an IODH for PoolUtils.MIN_IDLE_TIMER

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/PooledObject.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/PooledObject.java?rev=1351164&r1=1351163&r2=1351164&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/PooledObject.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/PooledObject.java
Sun Jun 17 21:12:38 2012
@@ -112,6 +112,20 @@ public class PooledObject<T> implements 
         return (int)Math.min(Math.max(lastActiveDiff, Integer.MIN_VALUE), Integer.MAX_VALUE);
     }
 
+
+    @Override
+    public boolean equals(Object obj) {
+        // Overridden purely to stop FindBugs complaining because compareTo()
+        // has been defined.
+        return super.equals(obj);
+    }
+
+    @Override
+    public int hashCode() {
+        // Overridden because equals() had to be overridden (see above)
+        return super.hashCode();
+    }
+
     /**
      * Provides a String form of the wrapper for debug purposes. The format is
      * not fixed and may change at any time.



Mime
View raw message