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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 5.0, 6u10
    • core-libs
    • Fix Understood
    • x86
    • windows_xp

      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)
      ======================================================================

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

              Created:
              Updated:
              Imported:
              Indexed: