From 8fb7349579c0c82d7143601c2007cad6f4cfb000 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 13 Sep 2012 14:12:07 +0200 Subject: [PATCH] Suppress warnings on potentiall-static methods. These methods all need to be overridden in subclasses. --- src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java | 2 ++ .../java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java | 6 ++++++ 2 files changed, 8 insertions(+) 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 8f074fb..22eeec8 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java @@ -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; } diff --git a/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java index 30071f5..97ee53b 100644 --- a/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java @@ -100,6 +100,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * The request to serve * @return The title of the page */ + @SuppressWarnings("static-method") protected String getPageTitle(FreenetRequest request) { return null; } @@ -175,6 +176,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * * @return Additional style sheets to load */ + @SuppressWarnings("static-method") protected Collection getStyleSheets() { return Collections.emptySet(); } @@ -184,6 +186,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * * @return The URL of the shortcut icon, or {@code null} for no icon */ + @SuppressWarnings("static-method") protected String getShortcutIcon() { return null; } @@ -227,6 +230,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * The request that is processed * @return The URL to redirect to, or {@code null} to not redirect */ + @SuppressWarnings("static-method") protected String getRedirectTarget(FreenetRequest request) { return null; } @@ -238,6 +242,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * The request for which to return the link nodes * @return All link nodes that should be added to the HTML head */ + @SuppressWarnings("static-method") protected List> getAdditionalLinkNodes(FreenetRequest request) { return Collections.emptyList(); } @@ -249,6 +254,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * @return {@code true} if this page should only be allowed for hosts with * full access, {@code false} to allow this page for any host */ + @SuppressWarnings("static-method") protected boolean isFullAccessOnly() { return false; } -- 2.7.4