Github user neykov commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/331#issuecomment-63179436
  
    > if i understand correctly, splits on and otherwise ignores non-digits
    
    It doesn't ignore them. If both parts are non-digits then compares plain 
strings (L80). 
    
    >(and use the natural order comparator so rc10 > rc1 !)
    
    Yes, definitely should use the natural order comparator for strings instead.
    
    > it would also be sensible to have special logic that, given two versions 
identical up to a qualifier we prefer the non-qualified item
    
    I though the logic should be the reverse (as it is now) - that's what I 
remember users expect? For example 3.3.0-200141115 beats 3.3.0.
    
    > NaturalOrderComparator sorts 0.0.0_SNAPSHOT higher than 
0.0.1-SNAPSHOT-20141111114709760
    
    Yes, didn't expect it but turns out that's the case. That's actually the 
reason why I decided to go with a separate comparator. First tried existing 
version parsers - OSGi's provided Version class and also an external dependency 
- semver which provides semantic Version class. Both failed to parse some of 
the version strings we have (underscore is not supported as a delimiter in 
semver, osgi requires a dot delimiter). They are just too strict for our use.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to