Browse Source

Correct generic type in BodyExtractor for form data

pull/1321/head
Rossen Stoyanchev 8 years ago
parent
commit
9efa976d31
  1. 2
      spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java
  2. 2
      spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java

2
spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java

@ -102,7 +102,7 @@ public abstract class BodyExtractors { @@ -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<Mono<MultiValueMap<String, String>>, ServerHttpRequest> toFormData() {
public static BodyExtractor<Mono<MultiValueMap<String, String>>, ReactiveHttpInputMessage> toFormData() {
return (serverRequest, context) -> {
HttpMessageReader<MultiValueMap<String, String>> messageReader = formMessageReader(context);
return messageReader.readMono(FORM_TYPE, serverRequest, context.hints());

2
spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java

@ -207,7 +207,7 @@ public class BodyExtractorsTests { @@ -207,7 +207,7 @@ public class BodyExtractorsTests {
@Test
public void toFormData() throws Exception {
BodyExtractor<Mono<MultiValueMap<String, String>>, ServerHttpRequest> extractor = BodyExtractors.toFormData();
BodyExtractor<Mono<MultiValueMap<String, String>>, ReactiveHttpInputMessage> extractor = BodyExtractors.toFormData();
DefaultDataBufferFactory factory = new DefaultDataBufferFactory();
DefaultDataBuffer dataBuffer =

Loading…
Cancel
Save