Avoid substring creation when string part to StringBuilder

See gh-900
This commit is contained in:
penekhun
2023-11-06 22:49:38 +09:00
committed by Andy Wilkinson
parent a9775688c4
commit 2e24582d2c

View File

@@ -213,7 +213,7 @@ public class UriModifyingOperationPreprocessor implements OperationPreprocessor
while (matcher.find()) {
for (int i = 1; i <= matcher.groupCount(); i++) {
if (matcher.start(i) >= 0) {
builder.append(input.substring(previous, matcher.start(i)));
builder.append(input, previous, matcher.start(i));
}
if (matcher.start(i) >= 0) {
previous = matcher.end(i);