diff --git a/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/searcher/LocalRepositorySearcher.java b/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/searcher/LocalRepositorySearcher.java index eed8392a..1298abbf 100644 --- a/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/searcher/LocalRepositorySearcher.java +++ b/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/searcher/LocalRepositorySearcher.java @@ -191,6 +191,11 @@ public File findLocalFile(Artifact gav) { } public void stop() { + // Stop the thread which collects local repository artifacts + cache + .values() + .forEach(f -> f.cancel(true)); + // Close the watch service which tracks the local repository. if (watchService != null && watchKey != null) { watchKey.cancel(); try {