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

[Smell] JavaModelManager.shutdown() join on Job family that seems unused #1212

Open
mickaelistria opened this issue Jul 4, 2023 · 1 comment

Comments

@mickaelistria
Copy link
Contributor

While working on #1190 and investigating the behavior of JavaModelManager, I noticed that its shutdown method calls JobManager.join(JavaCore.PLUGIN_ID,...) to "wait for the initialization job to finish". However, it looks like nowhere in JDT Core a job is created with a belongsTo that makes it part of the JavaCore.PLUGIN_ID. So it looks like this join is a no-op and could be removed; or that an important job misses instructions to be part of this JavaCore.PLUGIN_ID family.

@jukzi
Copy link
Contributor

jukzi commented Aug 10, 2023

Looks more like the JavaCore.PLUGIN_ID is not used as family where it should

					public boolean belongsTo(String jobFamily) {
						return true;
					}

As used in JavaModelManager and SearchableEnvironment and PatternSearchJob matchs the JobFamily JavaCore.PLUGIN_ID - and every other family.

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