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

Runtime.Version.compareTo/compareToIgnoreOpt problem

    Details

    • Subcomponent:
    • Resolved In Build:
      b162
    • Verification:
      Verified

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: