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

Chris Twiner updated MUSE-297:
------------------------------

    Fix Version/s: 2.2.1
         Assignee: Chris Twiner  (was: Dan Jemiolo)

Looks like a good candidate for 2.2.1 as its truly private, and only static 
methods access it.

> XsdUtils.getLocalTimeString not thread safe
> -------------------------------------------
>
>                 Key: MUSE-297
>                 URL: https://issues.apache.org/jira/browse/MUSE-297
>             Project: Muse
>          Issue Type: Bug
>          Components: WSDM Event Format (WEF)
>    Affects Versions: 2.2.0
>         Environment: Discovered on MacOS 10.5.5. But I believe it happens on 
> all platforms
>            Reporter: Hang Sun
>            Assignee: Chris Twiner
>            Priority: Blocker
>             Fix For: 2.2.1
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The XsdUtils class uses a static SimpleDateFormat object to format date 
> objects (see below). According to JDK:
> >>>
> Synchronization
> Date formats are not synchronized. It is recommended to create separate 
> format instances for each thread. If multiple threads access a format 
> concurrently, it must be synchronized externally.
> <<<
> We did observe strange exceptions from that class when the code runs in 
> multi-threaded environment. This forces us to put a hard sync. on unmarshal 
> ManagementEvent objects.
> ------
> public class XsdUtils
> {
>     //
>     // Used to format dates in the XMLSchema dateTime format
>     //
>     private static DateFormat _FORMATTER =
>         new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
>     

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to