You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2016/12/14 04:59:58 UTC

[jira] [Created] (JCRVLT-146) Package Manager should use osgiCompare to determine version order

Tobias Bocanegra created JCRVLT-146:
---------------------------------------

             Summary: Package Manager should use osgiCompare to determine version order
                 Key: JCRVLT-146
                 URL: https://issues.apache.org/jira/browse/JCRVLT-146
             Project: Jackrabbit FileVault
          Issue Type: Bug
          Components: Packaging
    Affects Versions: 3.1.30
            Reporter: Tobias Bocanegra
             Fix For: 3.1.32


The method that the package manager uses to compare versions should use the osgiCompare to be in-line with the OSGi container's functionality.
This will be more predictable for any jackrabbit/oak/sling user as they (probably) already understand the OSGi versioning. A customer will only have to learn one comparison method as well.

This change will it will treat the '-' and '.' equally as version segment separator. 

compareTo:
*6.1.58-FP3-R002* < *6.1.58*, i.e. *6.1.58* wins!

osgiCompareTo:
*6.1.58-FP3-R002* > *6.1.58*, i.e. *6.1.58-FP3-R002* wins!

see the tests in: https://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/VersionTest.java?view=markup




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)