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

Use single character variant of String.replace when applicable

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P5
    • 15
    • None
    • core-libs

    Description

      String.replace('a', 'b') is conceivably slightly more efficient than String.replace("a", "b").

      There is a couple of instances of the later variant found in
      src/java.base/share/classes/jdk/internal/module/Resources.java
      and
      src/java.base/share/classes/jdk/internal/module/ModulePath.java

      Reported via core-libs-dev mailing alias.

      Attachments

        Activity

          People

            igerasim Ivan Gerasimov
            igerasim Ivan Gerasimov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: