mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01: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:
parent
0d9b678f36
commit
664fb559a4
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user