Commit 42a451fcf3fa3ceba5845dd7c8352cfde56296e5
Committed by
Andrew Shvayka
1 parent
31c23b07
Fixed ugly null pointer exception when there is no or incomplete root rule chain.
Make it go to an log entry instead.
Showing
1 changed file
with
4 additions
and
0 deletions
... | ... | @@ -109,11 +109,15 @@ public class TenantActor extends RuleChainManagerActor { |
109 | 109 | } |
110 | 110 | |
111 | 111 | private void onServiceToRuleEngineMsg(ServiceToRuleEngineMsg msg) { |
112 | + if (ruleChainManager.getRootChainActor()!=null) | |
112 | 113 | ruleChainManager.getRootChainActor().tell(msg, self()); |
114 | + else logger.info("[{}] No Root Chain", msg); | |
113 | 115 | } |
114 | 116 | |
115 | 117 | private void onDeviceActorToRuleEngineMsg(DeviceActorToRuleEngineMsg msg) { |
118 | + if (ruleChainManager.getRootChainActor()!=null) | |
116 | 119 | ruleChainManager.getRootChainActor().tell(msg, self()); |
120 | + else logger.info("[{}] No Root Chain", msg); | |
117 | 121 | } |
118 | 122 | |
119 | 123 | private void onRuleChainMsg(RuleChainToRuleChainMsg msg) { | ... | ... |