-
Enhancement
-
Resolution: Unresolved
-
P4
-
5.0, 6u10
-
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)
======================================================================
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)
======================================================================
- duplicates
-
JDK-6340041 Matcher appendTail and appendReplacement should take CharSequence
- Closed
-
JDK-6893628 Add support for StringBuilder to java.util.regex.Matcher
- Closed