diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java index f0b58e278..4c7bf7372 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java @@ -1093,6 +1093,9 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener getContext(String ruleUID, @Nullable Set connections) { Map context = contextMap.computeIfAbsent(ruleUID, k -> new HashMap<>()); + if (context == null) { + throw new IllegalStateException("context cannot be null at that point - please report a bug."); + } if (connections != null) { StringBuffer sb = new StringBuffer(); for (Connection c : connections) {