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

Concurrency bug #143

Open
dantheperson opened this issue Jun 7, 2024 · 1 comment
Open

Concurrency bug #143

dantheperson opened this issue Jun 7, 2024 · 1 comment

Comments

@dantheperson
Copy link

I have a build with 20+ maven modules where about a dozen contain rest controllers.
If i run with mvn clean install all is good
But we normally run the build in parallel for significant speed savings with mvn clean install -T1C

Then we hit this issue non-deterministically

if(referenceDataObject == null) {
// Investigation on a rare bug where the reference is not found.
throw new RuntimeException(
	"Writing schema but could not find a reference for class " + dataObject.getJavaClass().getSimpleName());
}

I suspect the issue is in ApiResourceScanner, where a static reference to the TagLibrary gets overwritten.

public TagLibrary scanRestControllers() throws MojoFailureException {

final TagLibrary library = new TagLibrary();
TagLibraryHolder.INSTANCE.setTagLibrary(library);
@kbuntrock
Copy link
Owner

Thank you @dantheperson, I think you are right. Fun fact: after almost 2 years of utilisation, someone in my company reported me this issue yesterday. 😮

This will require me a bit of work since it is not the only "not thread safe" logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants