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

java.util.regex.Matcher should make more use of Appendable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0, 6u10
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      Name: jl125535 Date: 06/22/2004


      A DESCRIPTION OF THE REQUEST :
      The methods appendReplacement and appendTail in java.util.regex.Matcher would be even more effective if there were counterparts that used the Appendable interface as parameters and/or return values.

      public Matcher appendReplacement(Appendable sb, String replacement)

      public Appendable appendTail(Appendable sb)



      JUSTIFICATION :
      Since these methods are used to build strings, then I could easily use a StringBuilder or a PrintWriter as a replacement for StringBuffer, thus saving synchronization or copying overhead.
      (Incident Review ID: 280741)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sherman Xueming Shen
                Reporter:
                jleesunw Jon Lee (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: