Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Oct 10, 2017
1 parent 6833d4c commit 699fde9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@
*/
public class DeferredResultMethodReturnValueHandler implements HandlerMethodReturnValueHandler {


@Override
public boolean supportsReturnType(MethodParameter returnType) {
Class<?> type = returnType.getParameterType();
return DeferredResult.class.isAssignableFrom(type) ||
return (DeferredResult.class.isAssignableFrom(type) ||
ListenableFuture.class.isAssignableFrom(type) ||
CompletionStage.class.isAssignableFrom(type);
CompletionStage.class.isAssignableFrom(type));
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/docs/asciidoc/web/webflux-webclient.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ You can also get a stream of objects decoded from the response:
[subs="verbatim,quotes"]
----
Flux<Quote> result = client.get()
.uri("/quotes").accept(TEXT_EVENT_STREAM)
.uri("/quotes").accept(MediaType.TEXT_EVENT_STREAM)
.retrieve()
.bodyToFlux(Quote.class);
----
Expand All @@ -60,7 +60,7 @@ By default, responses with 4xx or 5xx status codes result in an error of type
.retrieve()
.onStatus(HttpStatus::is4xxServerError, response -> ...)
.onStatus(HttpStatus::is5xxServerError, response -> ...)
.bodyToFlux(Person.class);
.bodyToMono(Person.class);
----


Expand Down

0 comments on commit 699fde9

Please sign in to comment.