commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Thomas (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DBCP-285) BasicDataSource is thread-safe, but allows sub-classes to violate that
Date Sun, 15 Mar 2009 21:26:51 GMT

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

Mark Thomas resolved DBCP-285.
------------------------------

    Resolution: Fixed

Making fields private, whilst the technically correct option, would break compatibility and
backwards compatibility takes priority.

The suggested warning has been added.

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


Mime
View raw message