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

ModuleDescriptor.Version parsing treats empty segments inconsistently

XMLWordPrintable

      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


            myano Masanori Yano
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: