You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2011/04/12 19:26:05 UTC

[jira] [Commented] (WINK-329) SimpleDateFormat is not thread safe, so using a static is a problem

    [ https://issues.apache.org/jira/browse/WINK-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018920#comment-13018920 ] 

Hudson commented on WINK-329:
-----------------------------

Integrated in Wink-Trunk-JDK1.5 #456 (See [https://hudson.apache.org/hudson/job/Wink-Trunk-JDK1.5/456/])
    SimpleDateFormat is not thread safe so create new instance

Fixes [WINK-329]

Thanks to Mirko Friedenhagen for reporting the issue.


> SimpleDateFormat is not thread safe, so using a static is a problem
> -------------------------------------------------------------------
>
>                 Key: WINK-329
>                 URL: https://issues.apache.org/jira/browse/WINK-329
>             Project: Wink
>          Issue Type: Bug
>          Components: WebDAV
>            Reporter: Mirko Friedenhagen
>            Assignee: Bryant Luk
>            Priority: Critical
>
> See:
> http://svn.apache.org/viewvc/incubator/wink/trunk/wink-webdav/src/main/java/org/apache/wink/webdav/model/WebDAVModelHelper.java?revision=918698&view=markup
> and http://www.codefutures.com/weblog/andygrove/2007/10/simpledateformat-and-thread-safety.html
> Accessing the static SimpleDateFormat dateFormat from multiple threads will lead to problems. Either clone it before usage or create a new instance in convertDateToXMLDate and convertXMLDateToDate.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira