mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Prevent compiler error in Eclipse due to potential null value (#3210)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
+3
@@ -1093,6 +1093,9 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
|
||||
*/
|
||||
private Map<String, Object> getContext(String ruleUID, @Nullable Set<Connection> connections) {
|
||||
Map<String, Object> 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) {
|
||||
|
||||
Reference in New Issue
Block a user