From 788b33007d8d6e7648c3aa6c3c963fb22d0976f9 Mon Sep 17 00:00:00 2001 From: YevhenBondarenko Date: Fri, 13 Sep 2024 16:26:26 +0200 Subject: [PATCH 1/2] fixed NPE in RuleNOdeActorMessageProcessor --- .../actors/ruleChain/RuleNodeActorMessageProcessor.java | 7 ++++--- .../java/org/thingsboard/server/actors/TbActorMailbox.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/actors/ruleChain/RuleNodeActorMessageProcessor.java b/application/src/main/java/org/thingsboard/server/actors/ruleChain/RuleNodeActorMessageProcessor.java index e7b0113dbef..46ffb6e894d 100644 --- a/application/src/main/java/org/thingsboard/server/actors/ruleChain/RuleNodeActorMessageProcessor.java +++ b/application/src/main/java/org/thingsboard/server/actors/ruleChain/RuleNodeActorMessageProcessor.java @@ -43,6 +43,7 @@ @Slf4j public class RuleNodeActorMessageProcessor extends ComponentMsgProcessor { + private static final String UNKNOWN_NAME = "Unknown"; private final String ruleChainName; private final TbApiUsageReportClient apiUsageClient; private final DefaultTbContext defaultCtx; @@ -57,7 +58,7 @@ public class RuleNodeActorMessageProcessor extends ComponentMsgProcessor msg.onTbActorStopped(stopReason)); normalPriorityMsgs.forEach(msg -> msg.onTbActorStopped(stopReason)); } catch (Throwable t) { - log.warn("[{}] Failed to destroy actor: {}", selfId, t); + log.warn("[{}] Failed to destroy actor: ", selfId, t); } }); } From 0c4e06a0f948c46eaa4d2014a09ad2accc5d2283 Mon Sep 17 00:00:00 2001 From: YevhenBondarenko Date: Mon, 16 Sep 2024 10:31:12 +0200 Subject: [PATCH 2/2] minor refactoring due to comments --- .../actors/ruleChain/RuleNodeActorMessageProcessor.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/actors/ruleChain/RuleNodeActorMessageProcessor.java b/application/src/main/java/org/thingsboard/server/actors/ruleChain/RuleNodeActorMessageProcessor.java index 46ffb6e894d..75499b9a8d8 100644 --- a/application/src/main/java/org/thingsboard/server/actors/ruleChain/RuleNodeActorMessageProcessor.java +++ b/application/src/main/java/org/thingsboard/server/actors/ruleChain/RuleNodeActorMessageProcessor.java @@ -58,7 +58,7 @@ public class RuleNodeActorMessageProcessor extends ComponentMsgProcessor