Skip to content

Commit e7b8560

Browse files
authored
(Javalin Jsonb) Write directly to Jetty HttpOutput Stream
1 parent 6916939 commit e7b8560

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http-generator-javalin/src/main/java/io/avaje/http/generator/javalin/ControllerMethodWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private void writeContextReturn(final String resultVariableName) {
137137
if ("java.util.concurrent.CompletableFuture".equals(uType.mainType())) {
138138
uType = uType.paramRaw();
139139
}
140-
writer.append(" %sJsonType.toJson(%s, ctx.contentType(\"application/json\").outputStream());", uType.shortName(), resultVariableName);
140+
writer.append(" %sJsonType.toJson(%s, ctx.contentType(\"application/json\").res().getOutputStream());", uType.shortName(), resultVariableName);
141141
} else {
142142
writer.append(" ctx.json(%s);", resultVariableName);
143143
}

0 commit comments

Comments
 (0)