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

Use String.equals instead of String.compareTo in java.desktop

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 18
    • Component/s: client-libs
    • Labels:
    • Resolved In Build:
      b18

      Description

      In several places, String.compareTo was _compared_ with 0 ( via `== 0` or `!= 0`).
      Instead of this, we can use String.equals calls. String.equals is faster and shorter.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aturbanov Andrey Turbanov
              Reporter:
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: