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

Use Comparable.compare() instead of surrogate code

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • None
    • core-libs
    • None
    • b03

      Instead of something like

      long x;
      long y;
      (x < y) ? -1 : ((x == y) ? 0 : 1)

      we can use Long.compare(x, y)

            stsypanov Sergey Tsypanov
            stsypanov Sergey Tsypanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: