Skip to content

Commit 67e482a

Browse files
committed
Fix ROOT_PATH constant to match recent changes
"/" should be 0 segments, isAbsolute=true, hasTrailingSlash=false
1 parent ef3e309 commit 67e482a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class DefaultPathSegmentContainer implements PathSegmentContainer {
4343
new DefaultPathSegmentContainer("", Collections.emptyList());
4444

4545
private static final PathSegmentContainer ROOT_PATH =
46-
new DefaultPathSegmentContainer("/", Collections.singletonList(EMPTY_PATH_SEGMENT));
46+
new DefaultPathSegmentContainer("/", Collections.emptyList());
4747

4848

4949
private final String path;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void path() throws Exception {
9292
testPath("/a/b/c", "/a/b/c", false, true, Arrays.asList("a", "b", "c"), false);
9393

9494
// root path
95-
testPath("/", "/", false, true, Collections.singletonList(""), false);
95+
testPath("/", "/", false, true, Collections.emptyList(), false);
9696

9797
// empty path
9898
testPath("", "", true, false, Collections.emptyList(), false);

0 commit comments

Comments
 (0)