How about adding the DBCP unit tests to the source tree?  I suspect some would have failed due to this change.  If others think this is a good idea, I could take a stab at genericising them and creating a PR to add them.

On 10/11/19 3:31 PM, wrote:

Phil Steitz <> changed:

            What    |Removed                     |Added
                  OS|                            |All

--- Comment #2 from Phil Steitz <> ---
This is a regression from the generics conversion in PoolableConnectionFactory.

The original DBCP 1.x code effectively null-checked the object to be destroyed:
     public void destroyObject(Object obj) throws Exception {
         if(obj instanceof PoolableConnection) {

Removing the instanceOf check makes NPE possible:
     public void destroyObject(PoolableConnection obj) throws Exception {

Solution is to add an explicit null check in destroyObject.

Similar changes should be made to activate, passivate, validate methods.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to