Flipped equals statements with string literals

This commit is contained in:
Rsl1122 2019-01-03 14:04:26 +02:00
parent ca52000794
commit ad61522e89
6 changed files with 6 additions and 6 deletions

View File

@ -71,7 +71,7 @@ public class ManageImportCommand extends CommandNode {
String importArg = args[0];
if (importArg.equals("list")) {
if ("list".equals(importArg)) {
sender.sendMessage(locale.getString(ManageLang.IMPORTERS));
importSystem.getImporterNames().forEach(name -> sender.sendMessage("- " + name));
return;

View File

@ -131,7 +131,7 @@ public class LocaleSystem implements SubSystem {
private Optional<Locale> loadSettingLocale() {
try {
String setting = config.get(PluginSettings.LOCALE);
if (!setting.equalsIgnoreCase("default")) {
if (!"default".equalsIgnoreCase(setting)) {
return Optional.of(Locale.forLangCodeString(plugin, setting));
}
} catch (IOException e) {

View File

@ -159,7 +159,7 @@ public class WebServer implements SubSystem {
private boolean startHttpsServer() {
String keyStorePath = config.get(WebserverSettings.CERTIFICATE_PATH);
if (keyStorePath.equalsIgnoreCase("proxy")) {
if ("proxy".equalsIgnoreCase(keyStorePath)) {
return true;
}

View File

@ -51,7 +51,7 @@ public class InspectPagePluginsContent extends PageResponse {
public static InspectPagePluginsContent generateForThisServer(UUID playerUUID, ServerInfo serverInfo, HookHandler hookHandler) {
String serverName = serverInfo.getServer().getName();
String actualServerName = serverName.equals("Plan") ? "Server " + serverInfo.getServer().getId() : serverName;
String actualServerName = "Plan".equals(serverName) ? "Server " + serverInfo.getServer().getId() : serverName;
Map<PluginData, InspectContainer> containers = hookHandler.getInspectContainersFor(playerUUID);
if (containers.isEmpty()) {

View File

@ -49,7 +49,7 @@ public abstract class DateFormatter implements Formatter<Long> {
protected String format(long epochMs, String format) {
boolean useServerTime = config.isTrue(TimeSettings.USE_SERVER_TIME);
String localeSetting = config.get(PluginSettings.LOCALE);
java.util.Locale usedLocale = localeSetting.equalsIgnoreCase("default")
java.util.Locale usedLocale = "default".equalsIgnoreCase(localeSetting)
? java.util.Locale.ENGLISH
: java.util.Locale.forLanguageTag(localeSetting);
SimpleDateFormat dateFormat = new SimpleDateFormat(format, usedLocale);

View File

@ -247,7 +247,7 @@ public class InspectPage implements Page {
String serverName = serverNames.get(serverUUID);
replacer.put("networkName",
serverName.equalsIgnoreCase("bungeecord")
"bungeecord".equalsIgnoreCase(serverName)
? config.get(ProxySettings.NETWORK_NAME)
: serverName
);