X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FJsonPage.java;h=21f44d276211fa3cdc6b849fdfffb19f8b91e84e;hb=ea19cb28b8c1076db67a6d3a946db6c24b6030b0;hp=2f84d279192039eb53e11219a44c45958b73e57d;hpb=6610d8a9946508f17fc0ed2f0a7ff806a60c357f;p=Sone.git 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 2f84d27..21f44d2 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java @@ -100,7 +100,8 @@ public abstract class JsonPage implements FreenetPage { * The request to handle * @return The created JSON object */ - protected abstract JsonReturnObject createJsonObject(FreenetRequest request); + @Nonnull + protected abstract JsonReturnObject createJsonObject(@Nonnull FreenetRequest request); /** * Returns whether this command needs the form password for authentication @@ -224,10 +225,10 @@ public abstract class JsonPage implements FreenetPage { OutputStreamWriter writer = null; PrintWriter printWriter = null; try { - writer = new OutputStreamWriter(byteArrayOutputStream, "uTF-8"); + 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. */