From 134b5dd97ec3abf0b0c18826aa682744187a34d4 Mon Sep 17 00:00:00 2001 From: Victor Rubezhny Date: Thu, 27 Jul 2023 03:47:53 +0200 Subject: [PATCH] Maven Workspace Reader 'findArtifact' should not return cached Maven projects (?) #454 This fixes the similar exception for 'MavenLemminxWorkspaceReader.findVersions' Fixes: #454 --- .../extensions/maven/MavenLemminxWorkspaceReader.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/MavenLemminxWorkspaceReader.java b/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/MavenLemminxWorkspaceReader.java index f662139e..fca5b17a 100644 --- a/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/MavenLemminxWorkspaceReader.java +++ b/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/MavenLemminxWorkspaceReader.java @@ -258,11 +258,6 @@ public List findVersions(Artifact artifact) { } String key = ArtifactUtils.versionlessKey(artifact.getGroupId(), artifact.getArtifactId()); SortedSet res = new TreeSet<>(Comparator.reverseOrder()); - plugin.getProjectCache().getProjects().stream() // - .filter(p -> p.getArtifact() != null && key.equals(ArtifactUtils.versionlessKey(p.getArtifact()))) // - .filter(p -> find(p, artifact) != null) // - .map(MavenProject::getVersion) // - .forEach(res::add); workspaceArtifacts.entrySet().stream() // .filter(entry -> Objects.equals(key, ArtifactUtils.versionlessKey(entry.getKey().getGroupId(), entry.getKey().getArtifactId()))) .map(Entry::getKey)