diff --git a/application/src/main/java/org/thingsboard/server/actors/device/DeviceActorMessageProcessor.java b/application/src/main/java/org/thingsboard/server/actors/device/DeviceActorMessageProcessor.java
index da2c620..d4c42d8 100644
--- a/application/src/main/java/org/thingsboard/server/actors/device/DeviceActorMessageProcessor.java
+++ b/application/src/main/java/org/thingsboard/server/actors/device/DeviceActorMessageProcessor.java
@@ -95,12 +95,10 @@ public class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcesso
}
private void refreshAttributes(DeviceAttributesEventNotificationMsg msg) {
- if (this.deviceAttributes != null) {
- if (msg.isDeleted()) {
- msg.getDeletedKeys().forEach(key -> deviceAttributes.remove(key));
- } else {
- deviceAttributes.update(msg.getScope(), msg.getValues());
- }
+ if (msg.isDeleted()) {
+ msg.getDeletedKeys().forEach(key -> deviceAttributes.remove(key));
+ } else {
+ deviceAttributes.update(msg.getScope(), msg.getValues());
}
}
@@ -206,7 +204,6 @@ public class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcesso
}
void processAttributesUpdate(ActorContext context, DeviceAttributesEventNotificationMsg msg) {
- //TODO: improve this procedure to fetch only changed attributes and support attributes deletion
refreshAttributes(msg);
Set<AttributeKey> keys = msg.getDeletedKeys();
if (attributeSubscriptions.size() > 0) {
diff --git a/dao/src/main/java/org/thingsboard/server/dao/timeseries/SimpleListenableFuture.java b/dao/src/main/java/org/thingsboard/server/dao/timeseries/SimpleListenableFuture.java
index e10a40d..3f3e031 100644
--- a/dao/src/main/java/org/thingsboard/server/dao/timeseries/SimpleListenableFuture.java
+++ b/dao/src/main/java/org/thingsboard/server/dao/timeseries/SimpleListenableFuture.java
@@ -22,10 +22,6 @@ import com.google.common.util.concurrent.AbstractFuture;
*/
public class SimpleListenableFuture<V> extends AbstractFuture<V> {
- public SimpleListenableFuture() {
-
- }
-
public boolean set(V value) {
return super.set(value);
}