diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/SessionAttributeMethodArgumentResolver.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/SessionAttributeMethodArgumentResolver.java index b6eded3b22..153a6166da 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/SessionAttributeMethodArgumentResolver.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/SessionAttributeMethodArgumentResolver.java @@ -58,7 +58,7 @@ public class SessionAttributeMethodArgumentResolver extends AbstractNamedValueMe @Override protected Mono resolveName(String name, MethodParameter parameter, ServerWebExchange exchange){ return exchange.getSession().map(session -> session.getAttribute(name)) - .where(Optional::isPresent).map(Optional::get); + .filter(Optional::isPresent).map(Optional::get); } @Override