Skip to content

Commit 821e627

Browse files
committed
Undo unrelated changes
1 parent a6f883a commit 821e627

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/lang-painless/src/main/java/org/elasticsearch/painless/api/Augmentation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,10 @@ public static <K, V, T> Map<T, Map<K, V>> groupBy(Map<K, V> receiver, BiFunction
456456
public static String replaceAll(CharSequence receiver, Pattern pattern, Function<Matcher, String> replacementBuilder) {
457457
Matcher m = pattern.matcher(receiver);
458458
if (false == m.find()) {
459-
// CharSequence's toString is *supposed* to always return the characters in the sequence as a String
459+
// CharSequqence's toString is *supposed* to always return the characters in the sequence as a String
460460
return receiver.toString();
461461
}
462-
StringBuilder result = new StringBuilder(initialBufferForReplaceWith(receiver));
462+
StringBuffer result = new StringBuffer(initialBufferForReplaceWith(receiver));
463463
do {
464464
m.appendReplacement(result, Matcher.quoteReplacement(replacementBuilder.apply(m)));
465465
} while (m.find());
@@ -477,7 +477,7 @@ public static String replaceFirst(CharSequence receiver, Pattern pattern, Functi
477477
// CharSequqence's toString is *supposed* to always return the characters in the sequence as a String
478478
return receiver.toString();
479479
}
480-
StringBuilder result = new StringBuilder(initialBufferForReplaceWith(receiver));
480+
StringBuffer result = new StringBuffer(initialBufferForReplaceWith(receiver));
481481
m.appendReplacement(result, Matcher.quoteReplacement(replacementBuilder.apply(m)));
482482
m.appendTail(result);
483483
return result.toString();

0 commit comments

Comments
 (0)