100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
NPE bug fix for equalsIgnoreKeys in ObjectValueImpl
Rich Turnerf2faf649414a
diff --git a/model/src/main/java/org/openremote/model/value/impl/ObjectValueImpl.java b/model/src/main/java/org/openremote/model/value/impl/ObjectValueImpl.javaindex 7ae074b9f..313a2d9cb 100644--- a/model/src/main/java/org/openremote/model/value/impl/ObjectValueImpl.java+++ b/model/src/main/java/org/openremote/model/value/impl/ObjectValueImpl.java@@ -205,7 +205,12 @@ public class ObjectValueImpl extends ValueImpl implements ObjectValue {continue;Value mapAValue = entry.getValue();Value mapBValue = thatImpl.map.get(entry.getKey());- if (!mapAValue.equals(mapBValue)) {+ if (mapAValue == mapBValue) {+ continue;+ }++ // If mapAValue is null then mapBValue cannot be null otherwise above equality check would return true+ if (mapAValue == null || !mapAValue.equals(mapBValue)) {return false;}}