File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
modules/jooby-rocker/src/main/java/io/jooby/rocker Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 66package io .jooby .rocker ;
77
88import com .fizzed .rocker .RockerModel ;
9- import com .fizzed .rocker .runtime .ArrayOfByteArraysOutput ;
9+ import com .fizzed .rocker .runtime .StringBuilderOutput ;
1010import io .jooby .Context ;
1111import io .jooby .MediaType ;
1212import io .jooby .Route ;
1313
1414import javax .annotation .Nonnull ;
15- import java .util .List ;
1615
1716class RockerHandler implements Route .Handler {
1817 private final Route .Handler next ;
@@ -24,11 +23,8 @@ class RockerHandler implements Route.Handler {
2423 @ Nonnull @ Override public Object apply (@ Nonnull Context ctx ) throws Exception {
2524 try {
2625 RockerModel template = (RockerModel ) next .apply (ctx );
27- ArrayOfByteArraysOutput buff = template .render (ArrayOfByteArraysOutput .FACTORY );
28- List <byte []> arrays = buff .getArrays ();
2926 ctx .setResponseType (MediaType .html );
30- ctx .setResponseLength (buff .getByteLength ());
31- ctx .send (arrays .toArray (new byte [arrays .size ()][]));
27+ ctx .send (template .render (StringBuilderOutput .FACTORY ).toString ());
3228 return ctx ;
3329 } catch (Throwable x ) {
3430 ctx .sendError (x );
You can’t perform that action at this time.
0 commit comments