maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Halliday (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-5568) ComparableVersion's breaks contract for Comparable, in some edgecases the comparisons are not transitive
Date Tue, 25 Sep 2018 09:15:00 GMT

    [ https://issues.apache.org/jira/browse/MNG-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16627041#comment-16627041
] 

Jonathan Halliday commented on MNG-5568:
----------------------------------------

Maybe this one needs reopening?
{code:java}
java -jar ~/.m2/repository/org/apache/maven/maven-artifact/3.5.4/maven-artifact-3.5.4.jar
"2.9" "2.9-1" "2.9.0.rc-1" "2.9"
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 2.9 == 2.9
   2.9 < 2.9-1
2. 2.9-1 == 2.9-1
   2.9-1 < 2.9.0.rc-1
3. 2.9.0.rc-1 == 2.9.0.rc-1
   2.9.0.rc-1 < 2.9
4. 2.9 == 2.9
{code}

> ComparableVersion's breaks contract for Comparable, in some edgecases the comparisons
are not transitive
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-5568
>                 URL: https://issues.apache.org/jira/browse/MNG-5568
>             Project: Maven
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 3.0.5
>            Reporter: Milos Kleint
>            Assignee: Hervé Boutemy
>            Priority: Critical
>             Fix For: 3.2.5
>
>         Attachments: ComparableVersion.patch
>
>
> if ComparableVersion A > B and B > C, then it's required that A > C. In the
attached test patch, I'm demonstrating a case where it's failing. Please note that the situation
is not that rare, please see issues https://netbeans.org/bugzilla/show_bug.cgi?id=226100 and
https://netbeans.org/bugzilla/show_bug.cgi?id=240845 at netbeans.org and https://jira.codehaus.org/browse/MPIR-247



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message