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

XMLWordPrintable

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

      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

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

              Created:
              Updated:
              Resolved: