mojohaus / jaxb2-maven-plugin

JAXB2 Maven Plugin
https://www.mojohaus.org/jaxb2-maven-plugin/
Apache License 2.0
106 stars 77 forks source link

Marked XjcMojo as thread safe. #82

Closed dheid closed 7 years ago

dheid commented 7 years ago

Your plugin is thread safe: I execute it in my projects in parallel execution mode for several years now. I checked the code and found only one part that could be influenced by multiple threads:

In the class ArgumentBuilder there is one point where a List that is synchronized within blocks using a lock object (could be the manipulated object itself by the way) could be read during an updated. I added a synchronized block for it.

I checked the static class members of XjcMojo and saw, that each of it is immutable. There is no clear sign, that this plugin is not thread safe. It's worth to mark it thread-safe.

dheid commented 7 years ago

Are you going to merge this pull request?