Ref: add new static analyser rule: category/java/bestpractices.xml/LiteralsFirstInComparisons
This commit is contained in:
@@ -346,7 +346,7 @@ public class Worker {
|
||||
}
|
||||
|
||||
if (theme != null) {
|
||||
if (!theme.equals("light") && !theme.equals("dark")) {
|
||||
if ("light".equals(theme) == false && "dark".equals(theme) == false) {
|
||||
System.err.println("ERROR: The entered theme (-theme parameter) doesn't exist. Please choose either 'light' or 'dark'");
|
||||
System.exit(2);
|
||||
}
|
||||
@@ -406,7 +406,7 @@ public class Worker {
|
||||
}
|
||||
|
||||
if (shutdownMode != null) {
|
||||
if (shutdownMode.equalsIgnoreCase("wait") || shutdownMode.equalsIgnoreCase("hard")) {
|
||||
if ("wait".equalsIgnoreCase(shutdownMode) || "hard".equalsIgnoreCase(shutdownMode)) {
|
||||
config.setShutdownMode(shutdownMode.toLowerCase());
|
||||
}
|
||||
else {
|
||||
@@ -425,7 +425,7 @@ public class Worker {
|
||||
}
|
||||
|
||||
System.out.println("==============================================================================");
|
||||
if (config.getShutdownMode().equals("wait")) {
|
||||
if ("wait".equals(config.getShutdownMode())) {
|
||||
System.out.println(String.format(
|
||||
"WARNING!\n\nThe client will stop requesting new jobs at %s.\nTHE EFFECTIVE SHUTDOWN MIGHT OCCUR LATER THAN THE REQUESTED TIME AS THE UPLOAD\nQUEUE MUST BE FULLY UPLOADED BEFORE THE SHUTDOWN PROCESS STARTS.\n\nIf you want to shutdown the computer sharp at the specified time, please\ninclude the '-shutdown-mode hard' parameter in the application call",
|
||||
shutdownTime));
|
||||
|
||||
Reference in New Issue
Block a user