Fix/suppress PMD CompareObjectsWithEquals findings (#11476)
Newer PMD versions discover more CompareObjectsWithEquals findings. Related to https://github.com/openhab/static-code-analysis/pull/423 Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -68,6 +68,7 @@ public class VeluxDiscoveryService extends AbstractDiscoveryService implements R
|
||||
|
||||
// Private
|
||||
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
private void updateLocalization() {
|
||||
if (localization == Localization.UNKNOWN && localeProvider != null && i18nProvider != null) {
|
||||
logger.trace("updateLocalization(): creating Localization based on locale={},translation={}).",
|
||||
|
||||
@@ -125,6 +125,7 @@ public class VeluxHandlerFactory extends BaseThingHandlerFactory {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
private void updateLocalization() {
|
||||
if (localization == Localization.UNKNOWN && localeProvider != null && i18nProvider != null) {
|
||||
logger.trace("updateLocalization(): creating Localization based on locale={},translation={}).",
|
||||
|
||||
@@ -129,6 +129,7 @@ final class ChannelActuatorPosition extends ChannelHandlerTemplate {
|
||||
* information for this channel.
|
||||
* @return newValue ...
|
||||
*/
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
static @Nullable Command handleCommand(ChannelUID channelUID, String channelId, Command command,
|
||||
VeluxBridgeHandler thisBridgeHandler) {
|
||||
LOGGER.debug("handleCommand({},{},{},{}) called.", channelUID, channelId, command, thisBridgeHandler);
|
||||
|
||||
@@ -107,6 +107,7 @@ final class ChannelVShutterPosition extends ChannelHandlerTemplate {
|
||||
* information for this channel.
|
||||
* @return newValue ...
|
||||
*/
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
static @Nullable Command handleCommand(ChannelUID channelUID, String channelId, Command command,
|
||||
VeluxBridgeHandler thisBridgeHandler) {
|
||||
LOGGER.debug("handleCommand({},{},{},{}) called.", channelUID, channelId, command, thisBridgeHandler);
|
||||
|
||||
@@ -135,6 +135,7 @@ public class Thing2VeluxActuator {
|
||||
*
|
||||
* @return <b>bridgeProductIndex</B> for accessing the Velux device (or ProductBridgeIndex.UNKNOWN if not found).
|
||||
*/
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
public ProductBridgeIndex getProductBridgeIndex() {
|
||||
if (thisProduct == VeluxProduct.UNKNOWN) {
|
||||
mapThing2Velux();
|
||||
@@ -151,6 +152,7 @@ public class Thing2VeluxActuator {
|
||||
*
|
||||
* @return <b>isKnown</B> as boolean.
|
||||
*/
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
public boolean isKnown() {
|
||||
return (!(this.getProductBridgeIndex() == ProductBridgeIndex.UNKNOWN));
|
||||
}
|
||||
@@ -162,6 +164,7 @@ public class Thing2VeluxActuator {
|
||||
*
|
||||
* @return <b>isInverted</B> for handling of values of the Velux device (or false if not found)..
|
||||
*/
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
public boolean isInverted() {
|
||||
if (thisProduct == VeluxProduct.UNKNOWN) {
|
||||
mapThing2Velux();
|
||||
|
||||
Reference in New Issue
Block a user