You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2010/02/15 03:27:28 UTC

[jira] Closed: (DBCP-285) BasicDataSource is thread-safe, but allows sub-classes to violate that

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

Phil Steitz closed DBCP-285.
----------------------------


> BasicDataSource is thread-safe, but allows sub-classes to violate that
> ----------------------------------------------------------------------
>
>                 Key: DBCP-285
>                 URL: https://issues.apache.org/jira/browse/DBCP-285
>             Project: Commons Dbcp
>          Issue Type: Bug
>            Reporter: Sebb
>
> BasicDataSource is thread-safe, because all variables are read/written via synchronised methods.
> However, since almost all the variables are protected, sub-classes can ignore the synchronisation and compromise thread safety.
> Not sure I see the point of allowing a sub-class to do this; the variables ought to be private.
> If this cannot be done, then I suggest updating the Javadoc to warn classes not to use the instance variables directly.

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