From 9efa976d31a3d91cec8745a473aba89c6539135c Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 8 Feb 2017 16:46:58 -0500 Subject: [PATCH] Correct generic type in BodyExtractor for form data --- .../springframework/web/reactive/function/BodyExtractors.java | 2 +- .../web/reactive/function/BodyExtractorsTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java index 227790a17b..28e5b7ab4c 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java @@ -102,7 +102,7 @@ public abstract class BodyExtractors { * Return a {@code BodyExtractor} that reads form data into a {@link MultiValueMap}. * @return a {@code BodyExtractor} that reads form data */ - public static BodyExtractor>, ServerHttpRequest> toFormData() { + public static BodyExtractor>, ReactiveHttpInputMessage> toFormData() { return (serverRequest, context) -> { HttpMessageReader> messageReader = formMessageReader(context); return messageReader.readMono(FORM_TYPE, serverRequest, context.hints()); diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java index a6f4b54ea2..a027258f23 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java @@ -207,7 +207,7 @@ public class BodyExtractorsTests { @Test public void toFormData() throws Exception { - BodyExtractor>, ServerHttpRequest> extractor = BodyExtractors.toFormData(); + BodyExtractor>, ReactiveHttpInputMessage> extractor = BodyExtractors.toFormData(); DefaultDataBufferFactory factory = new DefaultDataBufferFactory(); DefaultDataBuffer dataBuffer =