commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DBCP-252) Bugs found by Findbugs
Date Sun, 09 Mar 2008 06:45:46 GMT

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

Phil Steitz resolved DBCP-252.
------------------------------

    Resolution: Fixed

Fixed all identified issues other than the PoolingDriver complaints which would require backward-incompatible
changes.

> Bugs found by Findbugs
> ----------------------
>
>                 Key: DBCP-252
>                 URL: https://issues.apache.org/jira/browse/DBCP-252
>             Project: Commons Dbcp
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 1.3
>
>
> ManagedConnection.java has (line 155)
> ================
>     protected class CompletionListener implements TransactionContextListener {
>         public void afterCompletion(TransactionContext transactionContext, boolean commited)
{
>             if (transactionContext == transactionContext) {
>                 transactionComplete();
>             }
>         }
>     }
> The transactionContext  parameter is hiding the field transactionContext.
> The parameter should be renamed, as at present the comparison will always succeed.
> PoolingDriver: 
> ===========
> the following fields should be final:
> _pools
> MAJOR_VERSION
> MINOR_VERSION
> URL_PREFIX
> URL_PREFIX_LEN
> In fact the last four should probably be private as well
> toString() should not return null
> CPDSConnectionFactory
> ===================
> setPool() is synch; getPool() is not. Either make both sync or make _pool volatile.
> setRollbackAfterValidation is synch, however the field it sets - _rollbackAfterValidation
- is not read using synch.
> Either synch the read operation - or better here - drop the synch, and make the field
volatile
> Same applies to setValidationQuery() and _validationQuery
> KeyedCPDSConnectionFactory
> ========================
> setRollbackAfterValidation is synch, however the field it sets - _rollbackAfterValidation
- is not read using synch.
> Either synch the read operation - or better here - drop the synch, and make the field
volatile
> Same applies to setValidationQuery() and _validationQuery
> PoolableConnectionFactory
> ======================
> setPool() is synch; getPool() is not. Either make both sync or make _pool volatile.

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