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.

Reply via email to