You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2007/10/31 05:05:50 UTC

[jira] Commented: (LANG-367) FastDateFormat thread safety

    [ https://issues.apache.org/jira/browse/LANG-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538981 ] 

Henri Yandell commented on LANG-367:
------------------------------------

Patch applied (r590552).

Keeping open until the SimpleDateFormat question is answered.

> FastDateFormat thread safety
> ----------------------------
>
>                 Key: LANG-367
>                 URL: https://issues.apache.org/jira/browse/LANG-367
>             Project: Commons Lang
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 2.4
>
>         Attachments: FastDateFormat.patch
>
>
> FastDateFormat has several static HashMaps. These are currently not final, so there is no guarantee that they will be visible to all threads.
> Patch to follow.
> Also, as far as I can make out, the class shares SimpleDateFormat instances between threads.
> It does not document why this is OK.
> I'm guessing that it assumes that instances of the SimpleDateFormat class are thread-safe provided that they have the same attributes, but this is not documented. If this is the case, it's not clear that it is a valid assumption.

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