You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Mike Hatfield (JIRA)" <ji...@apache.org> on 2013/10/21 17:37:43 UTC

[jira] [Updated] (CMIS-731) CMISDateUtil.m not thread-safe

     [ https://issues.apache.org/jira/browse/CMIS-731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Hatfield updated CMIS-731:
-------------------------------

    Attachment: CMISDateUtil.diff

> CMISDateUtil.m not thread-safe
> ------------------------------
>
>                 Key: CMIS-731
>                 URL: https://issues.apache.org/jira/browse/CMIS-731
>             Project: Chemistry
>          Issue Type: Bug
>          Components: objectivecmis
>    Affects Versions: ObjectiveCMIS 0.2
>            Reporter: Mike Hatfield
>         Attachments: CMISDateUtil.diff
>
>
> CMISDateUtil causes problems in multi-threaded environments, e.g. when parsing responses from requests using parallel NSOperations.
> Problem 1:
> NSDateFormatters are documented by Apple to be non-thread safe. The util class create a single, static instance which is reused across threads. This needs to be refactored.
> Problem 2:
> The dateFromString: method creates a static NSCalendar instance. This has similar problems to the NSDateFormatter above when exposed to a multi-threaded environment.



--
This message was sent by Atlassian JIRA
(v6.1#6144)