You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2007/12/21 01:12:03 UTC

svn commit: r606064 - in /commons/proper/pool/branches/1_4_RELEASE_BRANCH/src: java/org/apache/commons/pool/ test/org/apache/commons/pool/

Author: psteitz
Date: Thu Dec 20 16:12:02 2007
New Revision: 606064

URL: http://svn.apache.org/viewvc?rev=606064&view=rev
Log:
Restore JDK 1.3 compatibility.

Modified:
    commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/PoolUtils.java
    commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/MethodCallPoolableObjectFactory.java
    commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseKeyedObjectPool.java
    commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseObjectPool.java
    commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestKeyedObjectPool.java

Modified: commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/PoolUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/PoolUtils.java?rev=606064&r1=606063&r2=606064&view=diff
==============================================================================
--- commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/PoolUtils.java (original)
+++ commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/PoolUtils.java Thu Dec 20 16:12:02 2007
@@ -349,6 +349,7 @@
         if (pool == null) {
             throw new IllegalArgumentException("pool must not be null.");
         }
+        /*
         assert !(pool instanceof GenericObjectPool)
                 : "GenericObjectPool is already thread-safe";
         assert !(pool instanceof SoftReferenceObjectPool)
@@ -357,6 +358,7 @@
                 : "StackObjectPool is already thread-safe";
         assert !"org.apache.commons.pool.composite.CompositeObjectPool".equals(pool.getClass().getName())
                 : "CompositeObjectPools are already thread-safe";
+        */
         return new SynchronizedObjectPool(pool);
     }
 
@@ -378,12 +380,14 @@
         if (keyedPool == null) {
             throw new IllegalArgumentException("keyedPool must not be null.");
         }
+        /*
         assert !(keyedPool instanceof GenericKeyedObjectPool)
                 : "GenericKeyedObjectPool is already thread-safe";
         assert !(keyedPool instanceof StackKeyedObjectPool)
                 : "StackKeyedObjectPool is already thread-safe";
         assert !"org.apache.commons.pool.composite.CompositeKeyedObjectPool".equals(keyedPool.getClass().getName())
                 : "CompositeKeyedObjectPools are already thread-safe";
+        */
         return new SynchronizedKeyedObjectPool(keyedPool);
     }
 

Modified: commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/MethodCallPoolableObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/MethodCallPoolableObjectFactory.java?rev=606064&r1=606063&r2=606064&view=diff
==============================================================================
--- commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/MethodCallPoolableObjectFactory.java (original)
+++ commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/MethodCallPoolableObjectFactory.java Thu Dec 20 16:12:02 2007
@@ -134,7 +134,7 @@
             throw new PrivateException("validateObject");
         }
         final boolean r = valid;
-        call.returned(Boolean.valueOf(r));
+        call.returned(new Boolean(r));
         return r;
     }
 

Modified: commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseKeyedObjectPool.java?rev=606064&r1=606063&r2=606064&view=diff
==============================================================================
--- commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseKeyedObjectPool.java (original)
+++ commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseKeyedObjectPool.java Thu Dec 20 16:12:02 2007
@@ -33,7 +33,7 @@
 
     protected KeyedObjectPool makeEmptyPool(KeyedPoolableObjectFactory factory) {
         if (this.getClass() != TestBaseKeyedObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
         }
         throw new UnsupportedOperationException("BaseKeyedObjectPool isn't a complete implementation.");
     }
@@ -47,7 +47,7 @@
      */
     protected KeyedObjectPool makeEmptyPool(int mincapacity) {
         if (this.getClass() != TestBaseKeyedObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
         }
         throw new UnsupportedOperationException("BaseKeyedObjectPool isn't a complete implementation.");
     }
@@ -59,14 +59,14 @@
      */
     protected Object getNthObject(Object key, int n) {
         if (this.getClass() != TestBaseKeyedObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
         }
         throw new UnsupportedOperationException("BaseKeyedObjectPool isn't a complete implementation.");
     }
 
     protected Object makeKey(int n) {
         if (this.getClass() != TestBaseKeyedObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
         }
         throw new UnsupportedOperationException("BaseKeyedObjectPool isn't a complete implementation.");
     }
@@ -138,14 +138,14 @@
 
     protected boolean isLifo() {
         if (getClass() != TestBaseKeyedObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
         }
         return false;
     }
 
     protected boolean isFifo() {
         if (getClass() != TestBaseKeyedObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseKeyedObjectPool must reimplement this method.");
         }
         return false;
     }

Modified: commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseObjectPool.java?rev=606064&r1=606063&r2=606064&view=diff
==============================================================================
--- commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseObjectPool.java (original)
+++ commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestBaseObjectPool.java Thu Dec 20 16:12:02 2007
@@ -37,35 +37,35 @@
     
     protected ObjectPool makeEmptyPool(int mincapacity) {
         if (this.getClass() != TestBaseObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseObjectPool must reimplement this method.");
         }
         throw new UnsupportedOperationException("BaseObjectPool isn't a complete implementation.");
     }
 
     protected ObjectPool makeEmptyPool(final PoolableObjectFactory factory) {
         if (this.getClass() != TestBaseObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseObjectPool must reimplement this method.");
         }
         throw new UnsupportedOperationException("BaseObjectPool isn't a complete implementation.");
     }
 
     protected Object getNthObject(final int n) {
         if (this.getClass() != TestBaseObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseObjectPool must reimplement this method.");
         }
         throw new UnsupportedOperationException("BaseObjectPool isn't a complete implementation.");
     }
 
     protected boolean isLifo() {
         if (this.getClass() != TestBaseObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseObjectPool must reimplement this method.");
         }
         return false;
     }
 
     protected boolean isFifo() {
         if (this.getClass() != TestBaseObjectPool.class) {
-            throw new AssertionError("Subclasses of TestBaseObjectPool must reimplement this method.");
+            fail("Subclasses of TestBaseObjectPool must reimplement this method.");
         }
         return false;
     }

Modified: commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestKeyedObjectPool.java?rev=606064&r1=606063&r2=606064&view=diff
==============================================================================
--- commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestKeyedObjectPool.java (original)
+++ commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/test/org/apache/commons/pool/TestKeyedObjectPool.java Thu Dec 20 16:12:02 2007
@@ -465,7 +465,7 @@
                 throw new PrivateException("validateObject");
             }
             final boolean r = true;
-            call.returned(Boolean.valueOf(r));
+            call.returned(new Boolean(r));
             return r;
         }