gnodet commented on code in PR #11283:
URL: https://github.com/apache/maven/pull/11283#discussion_r2435857260


##########
api/maven-api-model/src/main/mdo/maven.mdo:
##########
@@ -1367,11 +1367,12 @@
     private volatile String managementKey;
 
     /**
-     * @return the management key as {@code groupId:artifactId:type}
+     * @return the management key as {@code 
groupId:artifactId:type[:classifier]}
      */
     public String getManagementKey() {
         if (managementKey == null) {
-            managementKey = (getGroupId() + ":" + getArtifactId() + ":" + 
getType() + (getClassifier() != null ? ":" + getClassifier() : "")).intern();
+            managementKey = (getGroupId() + ":" + getArtifactId() + ":" + 
getType()
+                    + (getClassifier() != null && !getClassifier().isEmpty() ? 
":" + getClassifier() : "")).intern();

Review Comment:
   More checks: 
   * 
[`classifier.isEmpty()`](https://github.com/search?q=repo%3Aapache%2Fmaven%20%22classifier.isEmpty()%22&type=code)
   * 
[`classifier().isEmpty()`](https://github.com/search?q=repo%3Aapache%2Fmaven+%22classifier%28%29.isEmpty%28%29%22&type=code)
   * 
[`classifier.isBlank()`](https://github.com/search?q=repo%3Aapache%2Fmaven%20%22classifier.isBlank()%22&type=code)
   * 
[`classifier().isBlank()`](https://github.com/search?q=repo%3Aapache%2Fmaven+%22classifier%28%29.isBlank%28%29%22&type=code)
   
   There's a single check for `isBlank` and I think it's wrong at this point.



-- 
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]

Reply via email to