Skip to content

Commit

Permalink
Maven Workspace Reader 'findArtifact' should not return cached Maven …
Browse files Browse the repository at this point in the history
…projects (?) eclipse-lemminx#454

This fixes the similar exception for 'MavenLemminxWorkspaceReader.findVersions'

Fixes: eclipse-lemminx#454
  • Loading branch information
vrubezhny committed Jul 27, 2023
1 parent 4943715 commit 134b5dd
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,6 @@ public List<String> findVersions(Artifact artifact) {
}
String key = ArtifactUtils.versionlessKey(artifact.getGroupId(), artifact.getArtifactId());
SortedSet<String> 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)
Expand Down

0 comments on commit 134b5dd

Please sign in to comment.