Skip to content

[fix] Undertow handler sets 204 status for methods with no return#152

Merged
bulldozer-bot[bot] merged 3 commits into
palantir:developfrom
carterkozak:ckozak/undertow/void_method_204
Jan 6, 2019
Merged

[fix] Undertow handler sets 204 status for methods with no return#152
bulldozer-bot[bot] merged 3 commits into
palantir:developfrom
carterkozak:ckozak/undertow/void_method_204

Conversation

@carterkozak
Copy link
Copy Markdown
Contributor

Previously they resulted in a 200 status with no response body.

Previously they resulted in a 200 status with no response body.
@carterkozak carterkozak requested a review from a team as a code owner December 31, 2018 22:09
BinarySerializers.serialize(result.get(), exchange);
} else {
exchange.setStatusCode(204);
exchange.setStatusCode(StatusCodes.NO_CONTENT);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is easier to read, nobody will have to look up 204. Compiled bytecode is identical.

@bulldozer-bot bulldozer-bot Bot merged commit 6d46cea into palantir:develop Jan 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants