-
Bug
-
Resolution: Done
-
Major
-
7.13.0.GA, 7.13.1.GA, 7.13.2.GA
Issue Description:
With non-exec-mode,
when $fact : Fact( $s: name, $s str[startsWith] "1" )
fails with
org.drools.mvel.ConstraintEvaluationException: Error evaluating constraint '$s.startsWith("1")' in [Rule "rule_check_startsWith", "rule_str_startsWith_NG" in /home/tkobayas/usr/work/03455865/reproducer-startsWith/kjar/target/classes/com/example/reproducer/Sample.drl] at org.drools.mvel.MVELConstraint.evaluate(MVELConstraint.java:286) at org.drools.mvel.MVELConstraint.isAllowed(MVELConstraint.java:234) at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:742) at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:595) at org.drools.core.reteoo.ObjectTypeNode.propagateAssert(ObjectTypeNode.java:297) at org.drools.core.phreak.PropagationEntry$Insert.propagate(PropagationEntry.java:162) at org.drools.core.phreak.PropagationEntry$Insert.execute(PropagationEntry.java:167) at org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:100) at org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:95) at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:853) at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:816) at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:808) at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1341) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1332) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1316) at com.example.reproducer.DroolsTest.main(DroolsTest.java:36) Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 at org.drools.core.base.EvaluatorWrapper.getFactHandle(EvaluatorWrapper.java:260) at org.drools.core.base.EvaluatorWrapper.loadHandles(EvaluatorWrapper.java:219) at org.drools.core.rule.constraint.EvaluatorHelper.initOperators(EvaluatorHelper.java:54) at ConditionEvaluator07e2037787b947faa23bf9d2cd0c8ae7.evaluate(Unknown Source) at org.drools.mvel.MVELConstraint.evaluate(MVELConstraint.java:284)
after mvel jitting (by default, evaluated 20 times).
Acceptance Criteria:
Fix the exception. Return the same result as non-jitting.
exec-model doesn't have this issue.
- clones
-
DROOLS-7366 str operator with bind variable fails after mvel jitting
- Resolved