-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: proceed with RequestFilter and CompletableFuture #11285
Conversation
//tag::methods[] | ||
@RequestFilter | ||
@Nullable | ||
public CompletableFuture<@Nullable HttpResponse<?>> filter(@NonNull HttpRequest<?> request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that if you remove the @Nullable
annotation. It does not work. This PR ensures the users finds the correct return type incantation. He needs to use CompletableFuture<@Nullable HttpResponse<?>>
not CompletableFuture<HttpResponse<?>>
.
public CompletableFuture<@Nullable HttpResponse<?>> filter(@NonNull HttpRequest<?> request) { | |
public CompletableFuture<HttpResponse<?>> filter(@NonNull HttpRequest<?> request) { |
4ac939d
to
5cd988a
Compare
.../micronaut/http/server/tck/tests/filter/RequestFilterCompletableFutureFutureProceedTest.java
Show resolved
Hide resolved
…ts/filter/RequestFilterCompletableFutureFutureProceedTest.java
It should be also possible to use |
…b.com:micronaut-projects/micronaut-core into doc-request-filter-completeablefuture-proceed
Documented and I added a test of |
...io/micronaut/http/server/tck/tests/filter/RequestFilterCompletionStageFutureProceedTest.java
Show resolved
Hide resolved
…ts/filter/RequestFilterCompletionStageFutureProceedTest.java
Quality Gate passedIssues Measures |
No description provided.