Is Builder.build() thread safe? I couldn't find any info in XOM Javadoc.
Asked
Active
Viewed 277 times
1
-
Not sure, but the slide at http://www.xom.nu/whatswrong/img23.html says (in a very general way) "Not thread safe". – Eli Acherkan Sep 01 '11 at 06:40
1 Answers
2
Builder
doesn't tell us that one of the builder methods is thread-safe and we have no reason to assume it: the methods are not synchronized (look at the code) and the class uses the first available parser and delegates the work.
So we should avoid sharing one instance of nu.xom.Builder
between different threads.

Andreas Dolk
- 113,398
- 19
- 180
- 268