Skip to content

Commit

Permalink
Bugfix: using getResponseHeaders() to send a response
Browse files Browse the repository at this point in the history
  • Loading branch information
ratcashdev committed Apr 9, 2019
1 parent 9e1eee1 commit c362ca5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ protected void addClassMethodHandlers(TypeSpec.Builder typeBuilder, Class<?> cla
methodBuilder.addStatement("exchange.getResponseHeaders().put($T.CONTENT_TYPE, $S)", Headers.class, producesContentType);

if (m.getReturnType().equals(String.class)) {
methodBuilder.addStatement("exchange.getResponseHeaders().send($L)", "response");
methodBuilder.addStatement("exchange.getResponseSender().send($L)", "response");
} else {
methodBuilder.addStatement("exchange.getResponseSender().send($L.toString())", "response");
}
Expand Down

0 comments on commit c362ca5

Please sign in to comment.