seaside1 / jrule

openHAB Java Rules Engine
Eclipse Public License 2.0
29 stars 15 forks source link

Preconditions on UNDEF or NULL throws exception #203

Open seime opened 3 months ago

seime commented 3 months ago
2024-07-11 13:15:50.101 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching/filtering event for subscriber 'org.openhab.core.events.EventSubscriber' failed: Invalid BigDecimal value: UNDEF
java.lang.NumberFormatException: Invalid BigDecimal value: UNDEF
        at org.openhab.core.library.types.QuantityType.<init>(QuantityType.java:134) ~[?:?]
        at org.openhab.core.library.types.QuantityType.<init>(QuantityType.java:107) ~[?:?]
        at org.openhab.core.library.types.QuantityType.valueOf(QuantityType.java:208) ~[?:?]
        at org.openhab.automation.jrule.internal.engine.JRuleEngine.lambda$41(JRuleEngine.java:308) ~[?:?]
        at java.util.Optional.filter(Optional.java:218) ~[?:?]
        at org.openhab.automation.jrule.internal.engine.JRuleEngine.lambda$36(JRuleEngine.java:308) ~[?:?]
        at java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) ~[?:?]
        at java.util.AbstractList$RandomAccessSpliterator.tryAdvance(AbstractList.java:706) ~[?:?]
        at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?]
        at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) ~[?:?]
        at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637) ~[?:?]
        at org.openhab.automation.jrule.internal.engine.JRuleEngine.matchPrecondition(JRuleEngine.java:281) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) ~[?:?]
        at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) ~[?:?]
        at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) ~[?:?]
        at java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) ~[?:?]
        at org.openhab.automation.jrule.internal.engine.JRuleEngine.fire(JRuleEngine.java:251) ~[?:?]
        at org.openhab.automation.jrule.internal.engine.JRuleEngine.propertyChange(JRuleEngine.java:328) ~[?:?]
        at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343) ~[?:?]
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335) ~[?:?]
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268) ~[?:?]
        at org.openhab.automation.jrule.internal.events.JRuleEventSubscriber.processEvent(JRuleEventSubscriber.java:172) ~[?:?]
        at org.openhab.automation.jrule.internal.events.JRuleEventSubscriber.receive(JRuleEventSubscriber.java:147) ~[?:?]
        at org.openhab.core.internal.events.EventHandler.lambda$2(EventHandler.java:169) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:840) [?:?]