From: David ‘Bombe’ Roden Date: Sun, 26 Aug 2012 19:54:28 +0000 (+0200) Subject: Declare all possibly-static methods as static. X-Git-Tag: 0.11^2~20 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8bc7a8f2372639a9fbeea34f9cbee9697f34ba3f;hp=593eba180ca6538a680810651f127fbcf0a620a3;p=jSite.git Declare all possibly-static methods as static. --- diff --git a/src/de/todesbaum/jsite/application/Project.java b/src/de/todesbaum/jsite/application/Project.java index d9a193c..a2aefd3 100644 --- a/src/de/todesbaum/jsite/application/Project.java +++ b/src/de/todesbaum/jsite/application/Project.java @@ -289,7 +289,7 @@ public class Project implements Comparable { * The URI to shorten * @return The shortened URI */ - private String shortenURI(String uri) { + private static String shortenURI(String uri) { String shortUri = uri; if (shortUri.startsWith("freenet:")) { shortUri = shortUri.substring("freenet:".length()); diff --git a/src/de/todesbaum/jsite/application/UpdateChecker.java b/src/de/todesbaum/jsite/application/UpdateChecker.java index 01960b8..0fefcc2 100644 --- a/src/de/todesbaum/jsite/application/UpdateChecker.java +++ b/src/de/todesbaum/jsite/application/UpdateChecker.java @@ -180,7 +180,7 @@ public class UpdateChecker implements Runnable { * The edition number * @return The URI for the update file for the given edition */ - private String constructUpdateKey(int edition) { + private static String constructUpdateKey(int edition) { return UPDATE_KEY + "/jSite/" + edition + "/jSite.properties"; } diff --git a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java index c0a02d0..08d63f6 100644 --- a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java @@ -516,7 +516,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl * The number of fractional digits * @return The formatted number */ - private String formatNumber(double number, int digits) { + private static String formatNumber(double number, int digits) { int multiplier = (int) Math.pow(10, digits); String formattedNumber = String.valueOf((int) (number * multiplier) / (double) multiplier); if (formattedNumber.indexOf('.') == -1) { diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index 7c7d8fd..3c9c3fa 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -406,7 +406,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen * @return The supported locale that was found, or the default locale if no * supported locale could be found */ - private Locale findSupportedLocale(Locale forLocale) { + private static Locale findSupportedLocale(Locale forLocale) { for (Locale locale : SUPPORTED_LOCALES) { if (locale.equals(forLocale)) { return locale;