X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FJsonPage.java;h=22eeec8ec855eda36cca525a5aef137efbd25594;hp=7c3abdbcd2b77d230060c1e1a30b5cc096da6351;hb=8fb7349579c0c82d7143601c2007cad6f4cfb000;hpb=69a9bc38d0b2a8f9f49f4ec7ea2a7cea0a85b0c2 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 7c3abdb..22eeec8 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java @@ -1,5 +1,5 @@ /* - * Sone - JsonPage.java - Copyright © 2010 David Roden + * Sone - JsonPage.java - Copyright © 2010–2012 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -139,6 +139,7 @@ public abstract class JsonPage implements FreenetPage { * @return {@code true} if the form password (given as “formPassword”) is * required, {@code false} otherwise */ + @SuppressWarnings("static-method") protected boolean needsFormPassword() { return true; } @@ -149,6 +150,7 @@ public abstract class JsonPage implements FreenetPage { * @return {@code true} if the user needs to be logged in to use this page, * {@code false} otherwise */ + @SuppressWarnings("static-method") protected boolean requiresLogin() { return true; } @@ -162,7 +164,7 @@ public abstract class JsonPage implements FreenetPage { * * @return A reply signaling success */ - protected JsonObject createSuccessJsonObject() { + protected static JsonObject createSuccessJsonObject() { return new JsonObject().put("success", true); } @@ -173,7 +175,7 @@ public abstract class JsonPage implements FreenetPage { * The error that has occured * @return The JSON object, signalling failure and the error code */ - protected JsonObject createErrorJsonObject(String error) { + protected static JsonObject createErrorJsonObject(String error) { return new JsonObject().put("success", false).put("error", error); }