Replace StringBuffer with StringBuilder in RuleBasedCollator

XMLWordPrintable

    • b17
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      java.text.RuleBasedCollator is using three instances of the synchronized StringBuffer in getCollationKey(), even though that method is synchronized by itself. Please consider replacing these with unsynchronized StringBuilder instances to speed up this expensive method a bit. Also, please consider replacing calls like "primResult.append(secResult.toString())" with "primResult.append(secResult)" in this method to reduce unnecessary creation of String object.


            Assignee:
            Justin Lu
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: