Browse Source
Merge pull request #16316 from irynamatveieva/fix/alarm-rule-state-hashcode-recursion-lts-4.3
Fix StackOverflowError in AlarmRuleState hashCode/toString
pull/16393/head
Viacheslav Klimov
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
2 deletions
-
application/src/main/java/org/thingsboard/server/actors/tenant/TenantActor.java
-
application/src/main/java/org/thingsboard/server/service/cf/ctx/state/alarm/AlarmRuleState.java
|
|
|
@ -196,8 +196,8 @@ public class TenantActor extends RuleChainManagerActor { |
|
|
|
|
|
|
|
private void forwardToCfActor(TenantAwareMsg msg, boolean priority) { |
|
|
|
if (cfActor == null) { |
|
|
|
if (msg instanceof CalculatedFieldStateRestoreMsg) { |
|
|
|
log.warn("[{}] CF Actor is not initialized. ToCalculatedFieldSystemMsg: [{}]", tenantId, msg); |
|
|
|
if (msg instanceof CalculatedFieldStateRestoreMsg restoreMsg) { |
|
|
|
log.warn("[{}] CF Actor is not initialized. Skipping CF state restore: [{}]", tenantId, restoreMsg.getId()); |
|
|
|
} else { |
|
|
|
log.debug("[{}] CF Actor is not initialized. ToCalculatedFieldSystemMsg: [{}]", tenantId, msg); |
|
|
|
} |
|
|
|
|
|
|
|
@ -4,6 +4,8 @@ package org.thingsboard.server.service.cf.ctx.state.alarm; |
|
|
|
|
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode; |
|
|
|
import lombok.Data; |
|
|
|
import lombok.EqualsAndHashCode; |
|
|
|
import lombok.ToString; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.thingsboard.common.util.JacksonUtil; |
|
|
|
import org.thingsboard.common.util.KvUtil; |
|
|
|
@ -38,6 +40,8 @@ public class AlarmRuleState { |
|
|
|
|
|
|
|
private final AlarmSeverity severity; |
|
|
|
private AlarmRule alarmRule; |
|
|
|
@ToString.Exclude |
|
|
|
@EqualsAndHashCode.Exclude |
|
|
|
private AlarmCalculatedFieldState state; |
|
|
|
|
|
|
|
private AlarmCondition condition; |
|
|
|
|