Unsupported brackets in right operator
--------------------------------------
Key: JBRULES-2484
URL:
https://jira.jboss.org/jira/browse/JBRULES-2484
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.1.0.M1, 5.0.1.FINAL
Reporter: Jeremy Ary
Assignee: Mark Proctor
Class QueueList has two properties:
private QueueIds idList; //QueueIds just extends HashMap<String, Integer>
private Collection<Integer> queueIds;
rule "testing"
when
QueueList ( queueIds contains idList["ABC"] )
then
System.out.println("testing fired");
end
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String
index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.drools.rule.builder.PatternBuilder.buildRestriction(PatternBuilder.java:888)
at org.drools.rule.builder.PatternBuilder.buildRestriction(PatternBuilder.java:717)
at org.drools.rule.builder.PatternBuilder.createRestriction(PatternBuilder.java:504)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:351)
at org.drools.rule.builder.PatternBuilder.buildConstraint(PatternBuilder.java:239)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:196)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:104)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:68)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1159)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:649)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:290)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:488)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
at com.sample.DroolsTest.createKnowledgeBase(DroolsTest.java:47)
at com.sample.DroolsTest.main(DroolsTest.java:19)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira