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:
@@ -14,6 +14,7 @@ package org.openhab.persistence.jdbc.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -140,7 +141,7 @@ public class ItemVO implements Serializable {
|
||||
} else if (!value.equals(other.value)) {
|
||||
return false;
|
||||
}
|
||||
return time == other.time;
|
||||
return Objects.equals(time, other.time);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user