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


##########
compat/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java:
##########
@@ -450,7 +460,14 @@ private static class CombinationItem implements Item {
         public int compareTo(Item item) {
             if (item == null) {
                 // 1-rc1 < 1, 1-ga1 > 1
-                return stringPart.compareTo(item);
+                int result = stringPart.compareTo(item);
+                if (result == 0) {
+                    // the string part is equivalent to the release qualifier 
("ga", "final", "release"),

Review Comment:
   Yes — `testReleaseQualifierWithDigitOrdering` (line 196) includes exactly 
this case:
   
   ```java
   checkVersionsOrder(new String[] {
       "1-rc1", "1", "1-ga1", "1-final2", "1-ga3", "1-release9", "1-ga11", 
"1-sp"
   });
   ```
   
   This verifies `1-ga9 < 1-ga11` (numeric comparison of the digit part, not 
lexicographic — where `"11" < "9"` would be wrong). It was added in the 
review-feedback commit.



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