Flush the correct stream
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 4 Oct 2017 17:26:54 +0000 (19:26 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 4 Oct 2017 17:26:54 +0000 (19:26 +0200)
src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java

index 943135d..21f44d2 100644 (file)
@@ -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. */