Declare all possibly-static methods as static.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 26 Aug 2012 19:54:28 +0000 (21:54 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 28 Aug 2012 08:51:49 +0000 (10:51 +0200)
src/de/todesbaum/jsite/application/Project.java
src/de/todesbaum/jsite/application/UpdateChecker.java
src/de/todesbaum/jsite/gui/ProjectInsertPage.java
src/de/todesbaum/jsite/main/Main.java

index d9a193c..a2aefd3 100644 (file)
@@ -289,7 +289,7 @@ public class Project implements Comparable<Project> {
         *            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());
index 01960b8..0fefcc2 100644 (file)
@@ -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";
        }
 
index c0a02d0..08d63f6 100644 (file)
@@ -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) {
index 7c7d8fd..3c9c3fa 100644 (file)
@@ -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;