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] Commented: (DBCP-319) Make private fields final where possible
Date Sat, 16 Jan 2010 17:50:54 GMT

    [ https://issues.apache.org/jira/browse/DBCP-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801237#action_12801237
] 

Phil Steitz commented on DBCP-319:
----------------------------------

The class cannot throw itself away, obviously.  It can release its reference to the physical
connection that it wraps, though, making it available for GC.   Especially if the close fails,
seems to me this is a reasonable thing to do.

> Make private fields final where possible
> ----------------------------------------
>
>                 Key: DBCP-319
>                 URL: https://issues.apache.org/jira/browse/DBCP-319
>             Project: Commons Dbcp
>          Issue Type: Improvement
>            Reporter: Sebb
>             Fix For: 1.4
>
>         Attachments: DBCP-319-private-final.patch
>
>
> Several private fields could be made final:
> AbandonedTrace.config
> AbandonedTrace.AbandonedObjectException._createdTime
> cpdsadapter.PooledConnectionImpl:
> * connection
> * delegatingConnection
> * eventListeners
> * statementEventListeners
> * pstmtPool is protected, but could probably be made final if it were not for the API
change that would imply
> cpdsadapter.PooledConnectionImpl.PStmtKey (nested class, variables are protected, but
might as well be private)
> * all of its fields could be made final
> datasources.[Keyed]CPDSConnectionFactory.validatingMap
> datasources.[Keyed]CPDSConnectionFactory.pcMap
> managed.PoolableManagedConnection.transactionRegistry
> managed.PoolableManagedConnectionFactory.transactionRegistry
> managed.TransactionRegistry.transactionManager|caches|xaResources
> .AbandonedObjectPool.config|trace

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