SQLUtils.enquoteIdentifier should cache the Pattern

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 26
    • Component/s: core-libs
    • None

      we are using the String.matches() method that call Pattern.compile(regex) every time:

      ...
              if (identifier.matches("^\".+\"$")) {
                  identifier = identifier.substring(1, len - 1);
              }
      ...

      We already have cached Patterns for other cases in this class, we should do the same here.

            Assignee:
            Zihao Lin
            Reporter:
            Fernando Guallini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: