You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Thomas (JIRA)" <ji...@apache.org> on 2014/02/02 21:40:09 UTC

[jira] [Resolved] (DBCP-404) Mutable fields should be private

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

Mark Thomas resolved DBCP-404.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

> Mutable fields should be private
> --------------------------------
>
>                 Key: DBCP-404
>                 URL: https://issues.apache.org/jira/browse/DBCP-404
>             Project: Commons Dbcp
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 2.0
>
>
> Non-private mutable fields make thread-safety harder.
> Make all mutable fields private (or at worst package-protected), and use getters/setters for access if necessary.
> This allows synchronisation to be easily added later if necessary, as well as potentially allowing validation of values.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)