Fix the latest snapshot resolver. (#4304)

This commit is contained in:
jason plumb 2021-10-05 13:41:54 -07:00 committed by GitHub
parent f63fe62a55
commit 4be3583c20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -53,10 +53,10 @@ public class LatestAgentSnapshotResolver {
return match.get().stream()
.filter(
elem -> {
String classifier = $(elem).child("classifier").content();
Match classifierMatch = $(elem).child("classifier");
String classifier = classifierMatch == null ? null : classifierMatch.content();
String extension = $(elem).child("extension").content();
// TODO (trask) this needs to be updated now that no more "all" artifact
return "all".equals(classifier) && "jar".equals(extension);
return "jar".equals(extension) && (classifier == null);
})
.map(e -> $(e).child("value").content())
.findFirst()