Fix ofResponseProcessor signature

This commit changes the `HandlerFilterFunction.ofResponseProcessor`
method signature to return `Mono<ServerResponse>`, to better cooperate
with response builders (which all return a `Mono`).
This commit is contained in:
Arjen Poutsma 2017-03-22 11:52:40 +01:00
parent 9e8bc95dd6
commit d17b99fe37
1 changed files with 2 additions and 2 deletions

View File

@ -92,10 +92,10 @@ public interface HandlerFilterFunction<T extends ServerResponse, R extends Serve
* @return the filter adaptation of the request processor
*/
static <T extends ServerResponse, R extends ServerResponse> HandlerFilterFunction<T, R> ofResponseProcessor(
Function<T, R> responseProcessor) {
Function<T, Mono<R>> responseProcessor) {
Assert.notNull(responseProcessor, "'responseProcessor' must not be null");
return (request, next) -> next.handle(request).map(responseProcessor);
return (request, next) -> next.handle(request).then(responseProcessor);
}