commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DBCP-307) PoolingConnection.PStmtKey.equals() and cpdsadapter.PooledConnectionImpl.PStmtKey.equals() don't check for null or the correct class
Date Mon, 23 Nov 2009 00:53:39 GMT

     [ https://issues.apache.org/jira/browse/DBCP-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb updated DBCP-307:
----------------------

    Attachment: dbcp_307.txt

> PoolingConnection.PStmtKey.equals() and cpdsadapter.PooledConnectionImpl.PStmtKey.equals()
don't check for null or the correct class
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DBCP-307
>                 URL: https://issues.apache.org/jira/browse/DBCP-307
>             Project: Commons Dbcp
>          Issue Type: Bug
>            Reporter: Sebb
>         Attachments: dbcp_307.txt
>
>
> PoolingConnection.PStmtKey.equals() and cpdsadapter.PooledConnectionImpl.PStmtKey.equals()
don't check for null or the correct class.
> Instead, they rely on catching NPE and ClassCastException.
> Although this should work, it's very bad practice, and will be slower than the corrected
code if the NPE or CCE is ever thrown.
> [Patch to follow]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message