https://bz.apache.org/bugzilla/show_bug.cgi?id=63833

Phil Steitz <p...@steitz.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #2 from Phil Steitz <p...@steitz.com> ---
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) {
            ((PoolableConnection)obj).reallyClose();
        }

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

Solution is to add an explicit null check in destroyObject.

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to