commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Commented: (DBCP-271) Thread safety issues in AbandonedTrace class
Date Fri, 27 Jun 2008 11:15:45 GMT


Sebb commented on DBCP-271:

Also, as far as I can tell, the parent instance field is used but never initialised.

> Thread safety issues in AbandonedTrace class
> --------------------------------------------
>                 Key: DBCP-271
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 1.3
> DBCP-270 implies that the AbandonedTrace class is called from multiple threads, however
it is not thread-safe:
> * SimpleDateFormat  is not threadsafe, but it is called without protection.
> * various instance fields need to be made final to ensure that they are published correctly
(memory visibility)
> * getLastUsed/setLastUsed need to be synchronized - or better, createdBy made volatile
so printStackTrace can access the variable safely
> (createdBy is rewritten, not updated, so lost updates are not important)
> Also, the Javadoc for printStackTrace() is wrong.

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

View raw message