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
Fix for location Exception
Michael Rademakerd18b6e60b7db
diff --git a/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java b/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.javaindex cf89878d8..f5a04fab3 100644--- a/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java+++ b/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java@@ -1177,7 +1177,7 @@ public class AssetStorageService extends RouteBuilder implements ContainerServic// Did the location change?Point oldLocation = persistenceEvent.getPreviousState("location");Point newLocation = persistenceEvent.getCurrentState("location");- if (oldLocation != newLocation || oldLocation == null || oldLocation.equalsExact(newLocation, 0)) {+ if ((oldLocation == null && newLocation != null) || oldLocation != newLocation || oldLocation.equalsExact(newLocation, 0)) {clientEventService.publishEvent(new LocationEvent(asset.getId(), asset.getCoordinates(), timerService.getCurrentTimeMillis()));