Commit 8838a48bd16cab8dcbd79e683c88da2e75fc1639

Authored by Igor Kulikov
1 parent 9c9aee04

Fix device profile update handling by rule node - preserve old key values to cor…

…rectly update entity keys snapshot
@@ -100,7 +100,7 @@ class DeviceState { @@ -100,7 +100,7 @@ class DeviceState {
100 } 100 }
101 101
102 public void updateProfile(TbContext ctx, DeviceProfile deviceProfile) throws ExecutionException, InterruptedException { 102 public void updateProfile(TbContext ctx, DeviceProfile deviceProfile) throws ExecutionException, InterruptedException {
103 - Set<AlarmConditionFilterKey> oldKeys = this.deviceProfile.getEntityKeys(); 103 + Set<AlarmConditionFilterKey> oldKeys = Set.copyOf(this.deviceProfile.getEntityKeys());
104 this.deviceProfile.updateDeviceProfile(deviceProfile); 104 this.deviceProfile.updateDeviceProfile(deviceProfile);
105 if (latestValues != null) { 105 if (latestValues != null) {
106 Set<AlarmConditionFilterKey> keysToFetch = new HashSet<>(this.deviceProfile.getEntityKeys()); 106 Set<AlarmConditionFilterKey> keysToFetch = new HashSet<>(this.deviceProfile.getEntityKeys());