Commit 9b6a0699 authored by Madhura Bhave's avatar Madhura Bhave

Merge branch '2.0.x'

parents ddce819e 777fc5e4
......@@ -297,20 +297,12 @@ public final class EndpointRequest {
}
List<RequestMatcher> antPath(String... parts) {
List<RequestMatcher> matchers = new ArrayList<>();
this.servletPaths.stream().map((p) -> {
if (StringUtils.hasText(p) && !p.equals("/")) {
return p;
}
return "";
}).distinct().forEach((path) -> {
StringBuilder pattern = new StringBuilder(path);
for (String part : parts) {
pattern.append(part);
}
matchers.add(new AntPathRequestMatcher(pattern.toString()));
});
return matchers;
return this.servletPaths.stream()
.map((p) -> (StringUtils.hasText(p) && !p.equals("/") ? p : ""))
.distinct()
.map((path) -> Arrays.stream(parts)
.collect(Collectors.joining("", path, "")))
.map(AntPathRequestMatcher::new).collect(Collectors.toList());
}
}
......
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