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

Simplify String.indexOf/lastIndexOf calls

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 19
    • Component/s: security-libs
    • Labels:
    • Resolved In Build:
      b16

      Description

      In a few places String.indexOf/lastIndexOf methods are called with default parameter for index: 0 for indexOf, length() for lastIndexOf.
      I propose to cleanup such calls. It makes code a bit easier to read. In case of indexOf it even could be faster, as there is separate intrinsic for indexOf call without index argument.

        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: