force PMD v7

PMD v7: fix new design/SimplifyBooleanReturns matches
PMD v7: fix new bestpractices/UnusedAssignment matches
PMD v7: fix new bestpractices/LiteralsFirstInComparisons matches
PMD v7: fix new codestyle/UnnecessaryFullyQualifiedName matches
PMD v7: fix new bestpractices/LooseCoupling matches
PMD rules: bestpractices/UseVarargs
PMD rules: sort lines
This commit is contained in:
M*C*O
2024-06-10 16:34:12 +00:00
committed by Laurent Clouet
parent 46f893327d
commit 48f3761656
17 changed files with 121 additions and 122 deletions

View File

@@ -502,7 +502,7 @@ public class SettingsLoader {
if (device != null) {
config.setGPUDevice(device);
}
else if (config.getUIType() != null && (config.getUIType().equals(GuiText.type) || config.getUIType().equals(GuiTextOneLine.type))) {
else if (config.getUIType() != null && (GuiText.type.equals(config.getUIType()) || GuiTextOneLine.type.equals(config.getUIType()))) {
System.err.println("SettingsLoader::merge could not find specified GPU");
System.exit(2);
}
@@ -533,7 +533,7 @@ public class SettingsLoader {
}
if (config.getTheme() == null) {
if (this.theme != null && (this.theme.getValue().equals("dark") || this.theme.getValue().equals("light"))) {
if (this.theme != null && ("dark".equals(this.theme.getValue()) || "light".equals(this.theme.getValue()))) {
config.setTheme(this.theme.getValue());
}
else {
@@ -547,7 +547,7 @@ public class SettingsLoader {
// if the user has invoked the app with --no-systray, then we just overwrite the existing configuration with (boolean)false. If no parameter has been
// specified and the settings file contains use-systray=false, then deactivate as well.
if (!config.isUseSysTray() || (config.isUseSysTray() && useSysTray != null && useSysTray.getValue().equals("false"))) {
if (!config.isUseSysTray() || (config.isUseSysTray() && useSysTray != null && "false".equals(useSysTray.getValue()))) {
config.setUseSysTray(false);
}