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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 18
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b25

      String.contains was introduced in Java 5.
      Some code in java.base 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.

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

              Created:
              Updated:
              Resolved: