Browse Source

Fix ROOT_PATH constant to match recent changes

"/" should be 0 segments, isAbsolute=true, hasTrailingSlash=false
pull/1460/head
Rossen Stoyanchev 9 years ago
parent
commit
67e482aaf8
  1. 2
      spring-web/src/main/java/org/springframework/http/server/reactive/DefaultPathSegmentContainer.java
  2. 2
      spring-web/src/test/java/org/springframework/http/server/reactive/DefaultPathSegmentContainerTests.java

2
spring-web/src/main/java/org/springframework/http/server/reactive/DefaultPathSegmentContainer.java

@ -43,7 +43,7 @@ class DefaultPathSegmentContainer implements PathSegmentContainer { @@ -43,7 +43,7 @@ class DefaultPathSegmentContainer implements PathSegmentContainer {
new DefaultPathSegmentContainer("", Collections.emptyList());
private static final PathSegmentContainer ROOT_PATH =
new DefaultPathSegmentContainer("/", Collections.singletonList(EMPTY_PATH_SEGMENT));
new DefaultPathSegmentContainer("/", Collections.emptyList());
private final String path;

2
spring-web/src/test/java/org/springframework/http/server/reactive/DefaultPathSegmentContainerTests.java

@ -92,7 +92,7 @@ public class DefaultPathSegmentContainerTests { @@ -92,7 +92,7 @@ public class DefaultPathSegmentContainerTests {
testPath("/a/b/c", "/a/b/c", false, true, Arrays.asList("a", "b", "c"), false);
// root path
testPath("/", "/", false, true, Collections.singletonList(""), false);
testPath("/", "/", false, true, Collections.emptyList(), false);
// empty path
testPath("", "", true, false, Collections.emptyList(), false);

Loading…
Cancel
Save