]
Mario Fusco updated DROOLS-5545:
--------------------------------
Sprint: 2020 Week 31-33 (from Jul 27)
Cannot create KieBase - StringIndexOutOfBounds
-----------------------------------------------
Key: DROOLS-5545
URL:
https://issues.redhat.com/browse/DROOLS-5545
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.33.0.Final, 7.34.0.Final, 7.35.0.Final, 7.36.0.Final,
7.37.0.Final, 7.38.0.Final, 7.39.0.Final, 7.40.0.Final
Reporter: Ciprian Chiru
Assignee: Mario Fusco
Priority: Major
Drls no longer built.
Give the rule:
{code:java}
package rules;
import org.example.drools.model.*;
import org.apache.commons.lang3.StringUtils;
global java.util.Set controlSet;
rule "will execute per each Measurement having ID color"
no-loop
when
Measurement( id == "color", $colorVal : val );
then
controlSet.add($colorVal);
end
rule "will execute per each Measurement having ID color #2"
no-loop
when
Measurement( !(StringUtils.isNotBlank(id)), $colorVal : val );
then
controlSet.add($colorVal);
end
rule "will execute per each Measurement having ID color #3"
no-loop
when
Measurement( !(id != "color"), $colorVal : val );
then
controlSet.add($colorVal);
end{code}
When the engine starts it throws:
{code:java}
StringIndexOutOfBounds begin 0, end -1, length 18{code}
Commenting out the last rule, it works.