Skip to content

Commit bde93fe

Browse files
committed
Merge pull request #900 from PENEKhun
* gh-900: Avoid substring creation when string part to StringBuilder Closes gh-900
2 parents a977568 + 2e24582 commit bde93fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/UriModifyingOperationPreprocessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private String modify(String input) {
213213
while (matcher.find()) {
214214
for (int i = 1; i <= matcher.groupCount(); i++) {
215215
if (matcher.start(i) >= 0) {
216-
builder.append(input.substring(previous, matcher.start(i)));
216+
builder.append(input, previous, matcher.start(i));
217217
}
218218
if (matcher.start(i) >= 0) {
219219
previous = matcher.end(i);

0 commit comments

Comments
 (0)