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

Use String.contains() instead of String.indexOf() in java.desktop

    XMLWordPrintable

    Details

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

      Description

      String.contains was introduced in Java 5.
      Some code in java.desktop still uses old approach with String.indexOf to check if String contains specified substring.
      I propose to migrate such usages. Makes code shorter and easier to read.

        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: