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

Replace StringBuffer with StringBuilder in RuleBasedCollator

    XMLWordPrintable

Details

    • b17
    • generic
    • 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

        Issue Links

          Activity

            People

              jlu Justin Lu
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: