[
https://issues.apache.org/jira/browse/DBCP-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583156#comment-16583156
]
Phil Steitz commented on DBCP-519:
----------------------------------
Regarding the sync stuff, I can't remember if there are locks other than the
objects' monitors you need to think about in those classes. If there are, just
using sync blocks or synchronizing the toString itself won't necessarily work.
I would check that and if there are none, just sync the getFields thing.
I remember once being surprised that UserPassKey had toString but it does so I
don't think you should remove it or revert it to Object.toString.
> Add some toString() methods for debugging (never printing user names and
> passwords)
> -----------------------------------------------------------------------------------
>
> Key: DBCP-519
> URL: https://issues.apache.org/jira/browse/DBCP-519
> Project: Commons DBCP
> Issue Type: Improvement
> Reporter: Gary Gregory
> Assignee: Gary Gregory
> Priority: Major
> Fix For: 2.6.0
>
>
> Add some toString() methods for debugging never printing user names and
> passwords:
> * org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS
> * org.apache.commons.dbcp2.cpdsadapter.PooledConnectionImpl
> * org.apache.commons.dbcp2.datasources.CPDSConnectionFactory
> * org.apache.commons.dbcp2.datasources.InstanceKeyDataSource
> * org.apache.commons.dbcp2.datasources.PerUserPoolDataSource
> * org.apache.commons.dbcp2.datasources.SharedPoolDataSource
> * org.apache.commons.dbcp2.datasources.UserPassKey (updated not to print
> passwords even though it was a char[] reference.)
> I went YAGNI here and only added what I needed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)