gnodet commented on code in PR #13296:
URL: https://github.com/apache/maven/pull/13296#discussion_r4161830884
##########
impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/MavenSnapshotMetadata.java:
##########
@@ -59,7 +59,10 @@ public static Object getKey(Artifact artifact) {
}
protected String getKey(String classifier, String extension) {
- return classifier + ':' + extension;
+ // A <snapshotVersion> without a <classifier> element reads as null,
while an artifact
+ // without a classifier has "". Both mean "no classifier" and must
share a key, or a
+ // merge keeps the previous build's entry next to the new one.
+ return (classifier == null ? "" : classifier) + ':' + extension;
}
Review Comment:
Confirmed — applied the same fix to both `LocalSnapshotMetadata` copies
(pending contributor update).
--
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]