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

Avoid String.compareTo == 0 to check String equality in java.management

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P5
    • Resolution: Fixed
    • None
    • 18
    • core-svc
    • None

    Description

      In several places, String.compareTo == 0 is used to check String.equality
      Instead of this, we can use String.equals and switch expression. They are faster and code is easier to read.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: