You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Brian K. Wallace (JIRA)" <ta...@jakarta.apache.org> on 2006/04/22 10:19:06 UTC
[jira] Resolved: (TAPESTRY-271) DateValidator Concurrency Bug
[ http://issues.apache.org/jira/browse/TAPESTRY-271?page=all ]
Brian K. Wallace resolved TAPESTRY-271:
---------------------------------------
Resolution: Fixed
Moved calendar from instance to local variable.
> DateValidator Concurrency Bug
> -----------------------------
>
> Key: TAPESTRY-271
> URL: http://issues.apache.org/jira/browse/TAPESTRY-271
> Project: Tapestry
> Type: Bug
> Components: Framework
> Versions: 3.0.2
> Environment: All
> Reporter: Hanson Char
> Assignee: Brian K. Wallace
> Fix For: 3.0.5
>
> There appears to be a concurrency bug in DateValidator:
> The "_calendar" member field in DateValidator is apparently not
> thread-safe. The only place it is used is within the toObject()
> method, which modifies the time of _calendar. To resolve this issue,
> this member variable should be changed to be a local variable, and
> simply replace the code in toObject()
> from
> if (_calendar == null)
> _calendar = new GregorianCalendar();
> to
> Calendar calendar = new GregorianCalendar();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org