|
||||||||||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||||||||||
To unsubscribe from this list please visit:

Hi Jesse,
thanks for the head's up with the initialization.
However, for the race condition, I will do nothing. XStream is not thread-safe during setup and if you rely on annotation processing on-the-fly, you are actually modifying the setup. This behavior is explicitly stated in the annotation tutorial and FAQ. Point is that every annotation modifies XStream's setup and there are a lot more places that would have to be synchronized then.
Therefore, if you cannot preprocess the annotations and you absolutely have to process them on-the-fly, you will have to use separate instances in your parallel threads - either creating a new one each time (expensive) or by using a shared pool (preferred).
At least I'll update the docs for these two alternatives.