Skip to content

Commit b961e5e

Browse files
committed
Use StringBuilder intead of StringBuffer in Regex
1 parent fe49539 commit b961e5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/util/matching/Regex.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ object Regex {
886886
private[matching] trait Replacement {
887887
protected def matcher: Matcher
888888

889-
private val sb = new java.lang.StringBuffer // StringBuffer for JDK 8 compatibility
889+
private val sb = new java.lang.StringBuilder
890890

891891
// Appends the remaining input and returns the result text.
892892
def replaced = {

0 commit comments

Comments
 (0)