Merge pull request #900 from PENEKhun

* gh-900:
  Avoid substring creation when string part to StringBuilder

Closes gh-900
This commit is contained in:
Andy Wilkinson
2023-11-14 10:24:06 +00:00

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);