From d838f2a86782256665e2b61dfbd1e5dc300422db Mon Sep 17 00:00:00 2001 From: YevhenBondarenko Date: Fri, 9 Oct 2020 16:32:55 +0300 Subject: [PATCH] fix NPE in DefaultTbDeviceProfileCache --- .../server/service/profile/DefaultTbDeviceProfileCache.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/src/main/java/org/thingsboard/server/service/profile/DefaultTbDeviceProfileCache.java b/application/src/main/java/org/thingsboard/server/service/profile/DefaultTbDeviceProfileCache.java index b0b47fe886..b6af0d7496 100644 --- a/application/src/main/java/org/thingsboard/server/service/profile/DefaultTbDeviceProfileCache.java +++ b/application/src/main/java/org/thingsboard/server/service/profile/DefaultTbDeviceProfileCache.java @@ -74,6 +74,8 @@ public class DefaultTbDeviceProfileCache implements TbDeviceProfileCache { if (device != null) { profileId = device.getDeviceProfileId(); devicesMap.put(deviceId, profileId); + } else { + return null; } } return get(tenantId, profileId);