From 43acc37587977b18a3eb27c6aff716e904e320e6 Mon Sep 17 00:00:00 2001 From: Hiroaki Yoshida Date: Mon, 20 Aug 2018 16:47:16 -0700 Subject: [PATCH] Fix String concatenation in a loop See gh-14153 --- .../autoconfigure/security/servlet/EndpointRequest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java index ac6413006f..4f65bb3c67 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java @@ -317,11 +317,11 @@ public final class EndpointRequest { public RequestMatcher antPath(RequestMatcherProvider matcherProvider, String... parts) { - String pattern = this.prefix; + StringBuffer pattern = new StringBuffer(this.prefix); for (String part : parts) { - pattern += part; + pattern.append(part); } - return matcherProvider.getRequestMatcher(pattern); + return matcherProvider.getRequestMatcher(pattern.toString()); } }