Skip to content

Commit 3d808be

Browse files
committed
Fix failing test
Signed-off-by: Filip Hrisafov <[email protected]>
1 parent 0307025 commit 3d808be

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,8 @@ private void initializeCookie(ResponseCookieBuilder builder) {
7777
map.from(cookie::getSecure).to(builder::secure);
7878
map.from(cookie::getMaxAge).to(builder::maxAge);
7979
map.from(cookie::getPartitioned).to(builder::partitioned);
80-
map.from(getSameSite(cookie)).to(builder::sameSite);
81-
}
82-
83-
private String getSameSite(Cookie properties) {
84-
SameSite sameSite = properties.getSameSite();
85-
return (sameSite != null && sameSite != SameSite.UNSET) ? sameSite.attributeValue() : null;
80+
map.from(cookie::getSameSite)
81+
.to(((sameSite) -> builder.sameSite((sameSite == SameSite.UNSET) ? null : sameSite.attributeValue())));
8682
}
8783

8884
}

0 commit comments

Comments
 (0)