Browse Source

fixed NullPointer exception in CachedAttributesService

pull/12580/head
dashevchenko 2 years ago
parent
commit
3d9897f5af
  1. 4
      dao/src/main/java/org/thingsboard/server/dao/attributes/CachedAttributesService.java

4
dao/src/main/java/org/thingsboard/server/dao/attributes/CachedAttributesService.java

@ -266,7 +266,9 @@ public class CachedAttributesService implements AttributesService {
String key = keyVersionPair.getFirst();
Long version = keyVersionPair.getSecond();
cache.evict(new AttributeCacheKey(scope, entityId, key), version);
edqsService.onDelete(tenantId, ObjectType.ATTRIBUTE_KV, new AttributeKv(entityId, scope, key, version));
if (version != null) {
edqsService.onDelete(tenantId, ObjectType.ATTRIBUTE_KV, new AttributeKv(entityId, scope, key, version));
}
return key;
}, cacheExecutor)).collect(Collectors.toList()));
}

Loading…
Cancel
Save