commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandy...@apache.org
Subject svn commit: r487667 - /jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java
Date Fri, 15 Dec 2006 21:18:48 GMT
Author: sandymac
Date: Fri Dec 15 13:18:47 2006
New Revision: 487667

URL: http://svn.apache.org/viewvc?view=rev&rev=487667
Log:
Make StackObjectPool.borrowObject to throw a NoSuchElementException when the PoolableObjectFactory.makeObject
returns null. addresses POOL-91

Modified:
    jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java

Modified: jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java?view=diff&rev=487667&r1=487666&r2=487667
==============================================================================
--- jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java
(original)
+++ jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackObjectPool.java
Fri Dec 15 13:18:47 2006
@@ -148,6 +148,9 @@
                 } else {
                     newlyCreated = true;
                     obj = _factory.makeObject();
+                  if (obj == null) {
+                    throw new NoSuchElementException("PoolableObjectFactory.makeObject()
returned null.");
+                  }
                 }
             }
             if (!newlyCreated && null != _factory && null != obj) {



---------------------------------------------------------------------
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