Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-2729

Provide a way to serialize version into comparable strings

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 15.4
    • Extension
    • None
    • Unknown

    Description

      org.xwiki.extension.version.Version are comparable and can easily be sorted in java.
      This is not the case when versions are stored in third parties such as databases or solr, where no specific sorting is available.
      Therefore, it is interesting to allow versions to be serialized to a format which can be compared alphanumerically while preserving the versions sorting semantics.
      To do so, I propose to serialize versions in the following way:

      • 1.1 would become 000001-000001
      • 1.1.1 would become 000001-000001-000001
      • 1.10 would become 000001-000010
      • 1.4-alpha3 would become 000001-000004-alpha-000003

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mleduc Manuel Leduc
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: