eclipse-ee4j / eclipse-ee4j/jersey
CompletionStage with null value should always yield 204
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following:
@Path("/null")
@GET
public String getNull() {
return null;
}
@Path("/null-async")
@GET
public CompletionStage getNullAsync() {
return CompletableFuture.completedFuture(null);
}
@Path("/null-async-defer")
@GET
public CompletionStage getNullAsyncDefer() {
final CompletableFuture cf = new CompletableFuture<>();
executor.schedule(() -> cf.complete(null), 1, SECONDS);
return cf;
}
The response statuses for these resources are respectively: `204`, `204`, `200`. The latter should be consistent with the others, i.e. a `204`.
Contributor guide
Assessment
This issue has not been assessed yet.