United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5066679 : java.util.regex.Matcher should make more use of Appendable

Details
Type:
Enhancement
Submit Date:
2004-06-22
Status:
Open
Updated Date:
2013-08-13
Project Name:
JDK
Resolved Date:
Component:
core-libs
OS:
windows_xp
Sub-Component:
java.util.regex
CPU:
x86
Priority:
P4
Resolution:
Unresolved
Affected Versions:
5.0,6u10
Targeted Versions:
tbd_major

Related Reports
Duplicate:
Duplicate:

Sub Tasks

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
                                     
2004-06-22



Hardware and Software, Engineered to Work Together