From: David ‘Bombe’ Roden Date: Wed, 4 Oct 2017 17:26:54 +0000 (+0200) Subject: Flush the correct stream X-Git-Tag: 0.9.7^2~29 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ea19cb28b8c1076db67a6d3a946db6c24b6030b0;p=Sone.git Flush the correct stream --- diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java index 943135d..21f44d2 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java @@ -228,7 +228,7 @@ public abstract class JsonPage implements FreenetPage { writer = new OutputStreamWriter(byteArrayOutputStream, "UTF-8"); printWriter = new PrintWriter(writer); t.printStackTrace(printWriter); - byteArrayOutputStream.flush(); + printWriter.flush(); return byteArrayOutputStream.toByteArray(); } catch (IOException ioe1) { /* quite not possible. */