Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marked XjcMojo as thread safe. #82

Merged
merged 1 commit into from May 16, 2017
Merged

Marked XjcMojo as thread safe. #82

merged 1 commit into from May 16, 2017

Conversation

dheid
Copy link
Contributor

@dheid dheid commented Apr 7, 2017

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.

ArgumentBuilder#getIndexForFlag to prevent threading issues (concurrent
update). Closes #81
@dheid
Copy link
Contributor Author

dheid commented Apr 10, 2017

Are you going to merge this pull request?

@lennartj lennartj self-assigned this May 16, 2017
@lennartj lennartj added this to the Release 2.4 milestone May 16, 2017
@lennartj lennartj merged commit ebfa8d4 into mojohaus:master May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants