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

Runtime.Version.compareTo/compareToIgnoreOpt problem

XMLWordPrintable

    • b162
    • Verified

        The spec says:
        "A version without a build number is always less than one with a build number; otherwise build numbers are compared numerically."
        However, the following code prints "false":

        System.out.println(Runtime.Version.parse("1.1.1").compareTo(Runtime.Version.parse("1.1.1+1")) < 0);

        The same result will be for compareToIgnoreOpt.

              prappo Pavel Rappo (Inactive)
              evotchen Elena Votchennikova (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: