JDK-5066679 : java.util.regex.Matcher should make more use of Appendable
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.regex
  • Affected Version: 5.0,6u10
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-06-22
  • Updated: 2018-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Duplicate :  
Duplicate :  
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) 
======================================================================

Comments
EVALUATION Sounds reasonable. Should consider this for a future release. ###@###.### 2004-06-22
22-06-2004