Merge pull request #14153 from hiroakiy:fix-string-concat

* pr/14153:
  Polish "Fix String concatenation in a loop"
  Fix String concatenation in a loop
This commit is contained in:
Stephane Nicoll 2018-08-22 10:48:20 +02:00
commit 7c3d863cf7
1 changed files with 3 additions and 3 deletions

View File

@ -317,11 +317,11 @@ public final class EndpointRequest {
public RequestMatcher antPath(RequestMatcherProvider matcherProvider,
String... parts) {
String pattern = this.prefix;
StringBuilder pattern = new StringBuilder(this.prefix);
for (String part : parts) {
pattern += part;
pattern.append(part);
}
return matcherProvider.getRequestMatcher(pattern);
return matcherProvider.getRequestMatcher(pattern.toString());
}
}