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

Avoid using String.replace(String, String) in codegen

    XMLWordPrintable

Details

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

    Description

      Two classes in codegen currently use String.replace("_STRICT", "") to cut the "_STRICT" postfix from internal callsite names. This is a bit wasteful because the search term is compiled to a regexp and we know it only ever occurs at the end of the String. So something like the following seems more efficient:

         name.endsWith("_STRICT") ? name.substring(0, name.length() - 7) : name

      Attachments

        Activity

          People

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: