You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org> on 2009/12/03 23:38:26 UTC

[jira] Resolved: (QPID-1972) UUID.randomUUID() is not thread-safe

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

Aidan Skinner resolved QPID-1972.
---------------------------------

    Resolution: Fixed

I've applied Julien's patch from QPID-1987

> UUID.randomUUID() is not thread-safe
> ------------------------------------
>
>                 Key: QPID-1972
>                 URL: https://issues.apache.org/jira/browse/QPID-1972
>             Project: Qpid
>          Issue Type: Bug
>          Components: Dot Net Client
>    Affects Versions: M3, M4, 0.5
>         Environment: .net API
>            Reporter: Julien Lavigne du Cadet
>            Priority: Critical
>             Fix For: 0.6
>
>
> UUID.randomUUID is not thread-safe because it's using a static random object.
> However, recreating a random object each time the method is called is not an option because 2 successive calls might result in the same UUID.
> Please find attached in the next comment a patch that fixes the issue by introducing a UUIDGenerator class. Now, to get a random UUID, you first need to instantiate a UUIDGenerator and request it through it. That way there's no need to lock in the UUID class.
> Please note that this patch is BREAKING COMPABILITY with previous versions of the API !
> The patch is also fixing 2 others issues : 
> - test.config is not included in the unit test project which result in half of the unit tests failing 
> - the management console is not compiling with vs 2008 and .Net 2.0

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org