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.

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

                Created:
                Updated:
                Resolved: