mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-10-29 19:57:28 +00:00
SPARK-2204: Code cleanup: Remove redundant final modifier from private and static methods
This commit is contained in:
parent
ff255e458e
commit
75682fec07
@ -37,7 +37,7 @@ public class FpRes {
|
||||
prb = (PropertyResourceBundle)ResourceBundle.getBundle("i18n/fastpath_i18n");
|
||||
}
|
||||
|
||||
public static final String getString(String propertyName) {
|
||||
public static String getString(String propertyName) {
|
||||
try {
|
||||
/* Revert to this code after Spark is moved to Java 11 or newer
|
||||
return prb.getString(propertyName);
|
||||
@ -51,7 +51,7 @@ public class FpRes {
|
||||
|
||||
}
|
||||
|
||||
public static final String getString(String propertyName, Object... obj) {
|
||||
public static String getString(String propertyName, Object... obj) {
|
||||
String str = prb.getString(propertyName);
|
||||
if (str == null) {
|
||||
return null;
|
||||
|
||||
@ -37,7 +37,7 @@ final public class FormUtils {
|
||||
* @param str - the string to check.
|
||||
* @return true if String has been assigned a value, false otherwise.
|
||||
*/
|
||||
final public static boolean isNotNull(String str) {
|
||||
public static boolean isNotNull(String str) {
|
||||
return str != null && str.trim().length() > 0;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ final public class FormUtils {
|
||||
* @return true if the string is not null and the value is equal to true, false
|
||||
* otherwise.
|
||||
*/
|
||||
final public static boolean isTrue(String str) {
|
||||
public static boolean isTrue(String str) {
|
||||
return (str != null && str.equalsIgnoreCase("true"));
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ final public class FormUtils {
|
||||
* @param newString the String that will replace all instances of oldString
|
||||
* @return a String will all instances of oldString replaced by newString
|
||||
*/
|
||||
public static final String replace(String string, String oldString, String newString) {
|
||||
public static String replace(String string, String oldString, String newString) {
|
||||
if (string == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -258,11 +258,11 @@ public class FastpathRes {
|
||||
prb = (PropertyResourceBundle)ResourceBundle.getBundle("fastpath");
|
||||
}
|
||||
|
||||
public static final String getString(String propertyName) {
|
||||
public static String getString(String propertyName) {
|
||||
return prb.getString(propertyName);
|
||||
}
|
||||
|
||||
public static final ImageIcon getImageIcon(String imageName) {
|
||||
public static ImageIcon getImageIcon(String imageName) {
|
||||
try {
|
||||
final String iconURI = getString(imageName);
|
||||
final URL imageURL = cl.getResource(iconURI);
|
||||
@ -274,7 +274,7 @@ public class FastpathRes {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final URL getURL(String propertyName) {
|
||||
public static URL getURL(String propertyName) {
|
||||
return cl.getResource(getString(propertyName));
|
||||
}
|
||||
|
||||
|
||||
@ -216,7 +216,7 @@ public class Notes extends JPanel {
|
||||
* @param newString the String that will replace all instances of oldString
|
||||
* @return a String will all instances of oldString replaced by newString
|
||||
*/
|
||||
public static final String replace(String string, String oldString, String newString) {
|
||||
public static String replace(String string, String oldString, String newString) {
|
||||
if (string == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ public class FlashingResources {
|
||||
prb = (PropertyResourceBundle)ResourceBundle.getBundle("i18n/flashing_i18n");
|
||||
}
|
||||
|
||||
public static final String getString(String propertyName) {
|
||||
public static String getString(String propertyName) {
|
||||
try {
|
||||
/* Revert to this code after Spark is moved to Java 11 or newer
|
||||
return prb.getString(propertyName);
|
||||
|
||||
@ -52,7 +52,7 @@ public class StreamReader {
|
||||
/**
|
||||
* Wait longer and longer to not keep CPU busy.
|
||||
*/
|
||||
private final void waitForInput() {
|
||||
private void waitForInput() {
|
||||
try {
|
||||
Thread.sleep(this.timeout);
|
||||
} catch (final InterruptedException e) {
|
||||
|
||||
@ -30,11 +30,11 @@ public class ReversiRes {
|
||||
ReversiRes.prb = (PropertyResourceBundle) ResourceBundle.getBundle("reversi");
|
||||
}
|
||||
|
||||
public static final String getString(String propertyName) {
|
||||
public static String getString(String propertyName) {
|
||||
return ReversiRes.prb.getString(propertyName);
|
||||
}
|
||||
|
||||
public static final ImageIcon getImageIcon(String imageName) {
|
||||
public static ImageIcon getImageIcon(String imageName) {
|
||||
try {
|
||||
final String iconURI = ReversiRes.getString(imageName);
|
||||
final URL imageURL = ReversiRes.cl.getResource(iconURI);
|
||||
@ -46,7 +46,7 @@ public class ReversiRes {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final URL getURL(String propertyName) {
|
||||
public static URL getURL(String propertyName) {
|
||||
return ReversiRes.cl.getResource(ReversiRes.getString(propertyName));
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ public class RoarResources {
|
||||
prb = (PropertyResourceBundle) ResourceBundle.getBundle("i18n/roar_i18n");
|
||||
}
|
||||
|
||||
public static final String getString(String propertyName) {
|
||||
public static String getString(String propertyName) {
|
||||
try {
|
||||
/* Revert to this code after Spark is moved to Java 11 or newer
|
||||
return prb.getString(propertyName);
|
||||
|
||||
@ -38,7 +38,7 @@ public class TTTRes {
|
||||
.getBundle("i18n/tictactoe_i18n");
|
||||
}
|
||||
|
||||
public static final String getString(String propertyName) {
|
||||
public static String getString(String propertyName) {
|
||||
try {
|
||||
return prb.getString(propertyName);
|
||||
} catch (Exception e) {
|
||||
|
||||
@ -24,7 +24,7 @@ public class TGuardRes {
|
||||
.getBundle("i18n/transferguard_i18n");
|
||||
}
|
||||
|
||||
public static final String getString(String propertyName) {
|
||||
public static String getString(String propertyName) {
|
||||
try {
|
||||
/* Revert to this code after Spark is moved to Java 11 or newer
|
||||
return prb.getString(propertyName);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user