[jboss-jira] [JBoss JIRA] (DROOLS-5545) Cannot create KieBase - StringIndexOutOfBounds

Ciprian Chiru (Jira) issues at jboss.org
Wed Jul 29 11:37:00 EDT 2020


Ciprian Chiru created DROOLS-5545:
-------------------------------------

             Summary: 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.40.0.Final, 7.39.0.Final, 7.38.0.Final, 7.37.0.Final, 7.36.0.Final, 7.35.0.Final, 7.34.0.Final, 7.33.0.Final
            Reporter: Ciprian Chiru
            Assignee: Mario Fusco


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.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list