gnodet commented on code in PR #954:
URL: https://github.com/apache/maven/pull/954#discussion_r1073602143
##########
maven-core/src/main/java/org/apache/maven/ReactorReader.java:
##########
@@ -117,18 +105,19 @@ public File findArtifact(Artifact artifact) {
}
public List<String> findVersions(Artifact artifact) {
- String key = ArtifactUtils.versionlessKey(artifact.getGroupId(),
artifact.getArtifactId());
-
- return
Optional.ofNullable(projectsByGA.get(key)).orElse(Collections.emptyList()).stream()
- .filter(s -> Objects.nonNull(find(s, artifact)))
+ return getProjects()
+ .getOrDefault(artifact.getGroupId(), Collections.emptyMap())
+ .getOrDefault(artifact.getArtifactId(), Collections.emptyMap())
+ .values()
+ .stream()
+ .filter(p -> Objects.nonNull(find(p, artifact)))
Review Comment:
I've renamed a few methods.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]