chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Hatfield (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CMIS-731) CMISDateUtil.m not thread-safe
Date Wed, 16 Apr 2014 09:48:15 GMT

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

Mike Hatfield commented on CMIS-731:
------------------------------------

This can be marked as resolved in ObjectiveCMIS 0.3 - it was committed in r1575945

> 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.2#6252)

Mime
View raw message