Skip to content

Commit

Permalink
java8 comp
Browse files Browse the repository at this point in the history
  • Loading branch information
tkountis committed Apr 11, 2024
1 parent bd182c9 commit a02a8e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public CompletionStage<String> slowHello(@DefaultValue("world") @QueryParam("who
@Produces(TEXT_PLAIN)
public CompletionStage<String> errorHello(@DefaultValue("true") @QueryParam("mapped") final boolean mapped,
@Context final ConnectionContext ctx) {
return CompletableFuture.failedFuture(mapped ? new IllegalStateException() : new Exception());
return Single.<String>failed(mapped ? new IllegalStateException() : new Exception()).toCompletionStage();
}

/**
Expand Down

0 comments on commit a02a8e1

Please sign in to comment.