Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8250678

ModuleDescriptor.Version parsing treats empty segments inconsistently

    XMLWordPrintable

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      In the "version number" section of the version, any consecutive "." are collapsed, so:

      * "1" == "1.0" == "1......0"

      Any trailing "." are dropped:

      * "1" == "1." == "1......."

      But in the pre-release and build sections, "." are only conditionally collapsed, such that any odd number of trailing "." is considered equal to that number of trailing "." minus one:

      * "1-1" == "1-1."
      * "1-1." < "1-1.."
      * "1-1.." == "1-1..."

      This does not extend to non-trailing "." in these sections, where:

      * "1-1+1a" == "1-1+1.a" (because number to letter transitions are equal to ".")
      * "1-1+1..a" < "1-1+1.a"
      * "1-1+1...a" < "1-1+1..a"
      * etc.

      Empty segments probably ought to be rejected outright.


      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: