Hello,
After upgrading from 2.0 to 2.1 (on openhabian image) I have a rule that having problem.
I’ve created a test case:
var java.util.Map<String, Boolean> t = newHashMap
val org.eclipse.xtext.xbase.lib.Procedures$Procedure2<SwitchItem,java.util.Map<String, Boolean>> doIt = [
SwitchItem r,
java.util.Map<String, Boolean> timers |
logInfo(“test”,"test1 on " + relayItem.name)
Boolean a = timers.getOrDefault(r) if (a) { logInfo("test","test2") timers.put(r.name, true) } logInfo("test","test3")
]
rule “map function”
when
System started
then
logInfo(“test”,“test start”)
doIt.apply(girlsLight, t)
logInfo(“test”,“test finished”)
end
In my real rule I the map is null when it gets to the procedure.
In this example I see this error:
2017-06-29 23:50:50.808 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘dyn.rules’, using it anyway:
This expression is not allowed in this context, since it doesn’t cause any side effects.
2017-06-29 23:50:50.941 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘dyn.rules’
2017-06-29 23:50:56.921 [INFO ] [.eclipse.smarthome.model.script.test] - test start