Suppress warnings on potentiall-static methods.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / JsonPage.java
index c6b7738..22eeec8 100644 (file)
@@ -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);
        }