Commit 2dc0488a authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #13706 from izeye:duplicate-empty-path

* pr/13706:
  Prevent duplicate RequestMatcher in RequestMatcherFactory.antPath()
parents 174cc2bc 13202eb2
......@@ -299,12 +299,12 @@ public final class EndpointRequest {
List<RequestMatcher> antPath(String... parts) {
List<RequestMatcher> matchers = new ArrayList<>();
this.servletPaths.stream().map((p) -> {
if (StringUtils.hasText(p)) {
if (StringUtils.hasText(p) && !p.equals("/")) {
return p;
}
return "";
}).distinct().forEach((path) -> {
String pattern = (path.equals("/") ? "" : path);
String pattern = path;
for (String part : parts) {
pattern += part;
}
......
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