commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandy...@apache.org
Subject svn commit: r421982 - in /jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool: TestKeyedObjectPoolFactory.java TestObjectPoolFactory.java
Date Fri, 14 Jul 2006 18:54:15 GMT
Author: sandymac
Date: Fri Jul 14 11:54:14 2006
New Revision: 421982

URL: http://svn.apache.org/viewvc?rev=421982&view=rev
Log:
Fixes POOL-82 by allowing Test[Keyed]ObjectPoolFactory be instantiated and run.

Modified:
    jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestKeyedObjectPoolFactory.java
    jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestObjectPoolFactory.java

Modified: jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestKeyedObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestKeyedObjectPoolFactory.java?rev=421982&r1=421981&r2=421982&view=diff
==============================================================================
--- jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestKeyedObjectPoolFactory.java
(original)
+++ jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestKeyedObjectPoolFactory.java
Fri Jul 14 11:54:14 2006
@@ -24,8 +24,8 @@
  * @author Sandy McArthur
  * @version $Revision$ $Date$
  */
-public abstract class TestKeyedObjectPoolFactory extends TestCase {
-    protected TestKeyedObjectPoolFactory(final String name) {
+public class TestKeyedObjectPoolFactory extends TestCase {
+    public TestKeyedObjectPoolFactory(final String name) {
         super(name);
     }
 
@@ -39,7 +39,9 @@
     /**
      * @throws UnsupportedOperationException when this is unsupported by this KeyedPoolableObjectFactory
type.
      */
-    protected abstract KeyedObjectPoolFactory makeFactory(KeyedPoolableObjectFactory objectFactory)
throws UnsupportedOperationException;
+    protected KeyedObjectPoolFactory makeFactory(KeyedPoolableObjectFactory objectFactory)
throws UnsupportedOperationException{
+        throw new UnsupportedOperationException("Subclass needs to override makeFactory method.");
+    }
 
     protected static KeyedPoolableObjectFactory createObjectFactory() {
         return PoolUtils.adapt(new MethodCallPoolableObjectFactory());

Modified: jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestObjectPoolFactory.java?rev=421982&r1=421981&r2=421982&view=diff
==============================================================================
--- jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestObjectPoolFactory.java
(original)
+++ jakarta/commons/proper/pool/trunk/src/test/org/apache/commons/pool/TestObjectPoolFactory.java
Fri Jul 14 11:54:14 2006
@@ -24,8 +24,8 @@
  * @author Sandy McArthur
  * @version $Revision$ $Date$
  */
-public abstract class TestObjectPoolFactory extends TestCase {
-    protected TestObjectPoolFactory(final String name) {
+public class TestObjectPoolFactory extends TestCase {
+    public TestObjectPoolFactory(final String name) {
         super(name);
     }
 
@@ -39,7 +39,9 @@
     /**
      * @throws UnsupportedOperationException when this is unsupported by this PoolableObjectFactory
type.
      */
-    protected abstract ObjectPoolFactory makeFactory(PoolableObjectFactory objectFactory)
throws UnsupportedOperationException;
+    protected ObjectPoolFactory makeFactory(PoolableObjectFactory objectFactory) throws UnsupportedOperationException
{
+        throw new UnsupportedOperationException("Subclass needs to override makeFactory method.");
+    }
 
     public void testCreatePool() throws Exception {
         final ObjectPoolFactory factory;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message