diff --git a/bundles/org.openhab.core.addon.marketplace/src/main/java/org/openhab/core/addon/marketplace/AbstractRemoteAddonService.java b/bundles/org.openhab.core.addon.marketplace/src/main/java/org/openhab/core/addon/marketplace/AbstractRemoteAddonService.java index 5247544d413..3a5ad56151b 100644 --- a/bundles/org.openhab.core.addon.marketplace/src/main/java/org/openhab/core/addon/marketplace/AbstractRemoteAddonService.java +++ b/bundles/org.openhab.core.addon.marketplace/src/main/java/org/openhab/core/addon/marketplace/AbstractRemoteAddonService.java @@ -298,7 +298,7 @@ protected boolean remoteEnabled() { try { Configuration configuration = configurationAdmin.getConfiguration("org.openhab.addons", null); Dictionary properties = configuration.getProperties(); - if (properties == null) { + if (properties == null) { // NOPMD // if we can't determine a set property, we use true (default is remote enabled) return true; } @@ -312,7 +312,7 @@ protected boolean includeIncompatible() { try { Configuration configuration = configurationAdmin.getConfiguration("org.openhab.addons", null); Dictionary properties = configuration.getProperties(); - if (properties == null) { + if (properties == null) { // NOPMD // if we can't determine a set property, we use false (default is show compatible only) return false; } diff --git a/bundles/org.openhab.core.audio/src/main/java/org/openhab/core/audio/AudioFormat.java b/bundles/org.openhab.core.audio/src/main/java/org/openhab/core/audio/AudioFormat.java index 4eac88e93f9..a1dcb72fc69 100644 --- a/bundles/org.openhab.core.audio/src/main/java/org/openhab/core/audio/AudioFormat.java +++ b/bundles/org.openhab.core.audio/src/main/java/org/openhab/core/audio/AudioFormat.java @@ -302,7 +302,7 @@ public boolean isCompatible(@Nullable AudioFormat audioFormat) { if (getBitRate() instanceof Integer bitRate && !bitRate.equals(audioFormat.getBitRate())) { return false; } - if (getFrequency() instanceof Long frequency && !frequency.equals(audioFormat.getFrequency())) { + if (getFrequency() instanceof Long frequency && !frequency.equals(audioFormat.getFrequency())) { // NOPMD return false; } return true; diff --git a/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java b/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java index 7db8de5c768..517bdcbc90e 100644 --- a/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java +++ b/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java @@ -748,7 +748,7 @@ public List getDialogRegistrations() { } private boolean checkLocales(Set supportedLocales, Locale locale) { - if (supportedLocales.isEmpty()) { + if (supportedLocales.isEmpty()) { // NOPMD return true; } return supportedLocales.stream().anyMatch(sLocale -> { diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/events/ThreadedEventHandler.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/events/ThreadedEventHandler.java index 480b411a364..32e050ddd46 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/events/ThreadedEventHandler.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/internal/events/ThreadedEventHandler.java @@ -60,7 +60,7 @@ public class ThreadedEventHandler implements Closeable { logger.trace("inspect event: {}", event); if (event == null) { logger.debug("Hey, you have really very few events."); - } else if (event.equals(notifyEvent)) { + } else if (event.equals(notifyEvent)) { // NOPMD // received an internal notification } else { worker.handleEvent(event); diff --git a/tools/static-code-analysis/pmd/suppressions.properties b/tools/static-code-analysis/pmd/suppressions.properties index cba6665f994..425770b683a 100644 --- a/tools/static-code-analysis/pmd/suppressions.properties +++ b/tools/static-code-analysis/pmd/suppressions.properties @@ -1,13 +1,8 @@ org.openhab.core.common.registry.AbstractRegistry=AvoidCatchingThrowable org.openhab.core.internal.common.SafeCallManagerImpl=CompareObjectsWithEquals -org.openhab.core.internal.events.ThreadedEventHandler=CompareObjectsWithEquals -org.openhab.core.internal.events.ThreadedEventHandler=EmptyIfStmt -org.openhab.core.thing.internal.ChannelItemProvider=CompareObjectsWithEquals -org.openhab.core.thing.internal.ThingManager=CompareObjectsWithEquals org.openhab.core.io.console.karaf.internal.OSGiConsole=SystemPrintln org.openhab.core.io.console.rfc147.internal.CommandWrapper=SystemPrintln org.openhab.core.io.console.rfc147.internal.OSGiConsole=SystemPrintln -org.openhab.core.io.net.http.internal.SecureHttpClientFactory=AvoidThrowingRawExceptionTypes org.openhab.core.model.core.internal.ModelRepositoryImpl=AvoidCatchingNPE org.openhab.core.model.script.interpreter.ScriptInterpreter=AvoidCatchingThrowable org.openhab.core.ui.internal.proxy.ProxyServletService=AvoidCatchingThrowable @@ -16,3 +11,4 @@ org.openhab.core.automation.internal.RuleRegistryImpl=CompareObjectsWithEquals org.openhab.core.automation.internal.provider.AutomationResourceBundlesEventQueue=AvoidCatchingThrowable org.openhab.core.io.console.karaf.internal.InstallServiceCommand=SystemPrintln org.openhab.core.common.PoolBasedSequentialScheduledExecutorService=CompareObjectsWithEquals +org.openhab.core.tools.UpgradeTool.java=SystemPrintln \ No newline at end of file