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

Replace StringBuffer with StringBuilder in RuleBasedCollator

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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.


        Attachments

          Activity

            People

            Assignee:
            naoto Naoto Sato
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: