Commit 43acc375 authored by Hiroaki Yoshida's avatar Hiroaki Yoshida Committed by Stephane Nicoll

Fix String concatenation in a loop

See gh-14153
parent 55406d91
...@@ -317,11 +317,11 @@ public final class EndpointRequest { ...@@ -317,11 +317,11 @@ public final class EndpointRequest {
public RequestMatcher antPath(RequestMatcherProvider matcherProvider, public RequestMatcher antPath(RequestMatcherProvider matcherProvider,
String... parts) { String... parts) {
String pattern = this.prefix; StringBuffer pattern = new StringBuffer(this.prefix);
for (String part : parts) { for (String part : parts) {
pattern += part; pattern.append(part);
} }
return matcherProvider.getRequestMatcher(pattern); return matcherProvider.getRequestMatcher(pattern.toString());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment