]
Mark Proctor updated JBRULES-2872:
----------------------------------
Fix Version/s: 5.2.0.CR1
NPE in AbstractCompositeRestriction when using unbound variables
----------------------------------------------------------------
Key: JBRULES-2872
URL:
https://issues.jboss.org/browse/JBRULES-2872
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler
Affects Versions: 5.1.1.FINAL
Reporter: Wolfgang Laun
Assignee: Edson Tirelli
Fix For: 5.2.0.CR1
This occurs with a pattern such as
Cell( rowNo == $rano || == $rbno, colNo != $c1no && != $c2no, free contains $i
)
where one or more of the bound variables $* are not bound in previous patterns.
Exception in thread "main" java.lang.NullPointerException
at
org.drools.rule.AbstractCompositeRestriction.getRequiredDeclarations(AbstractCompositeRestriction.java:59)
at
org.drools.rule.MultiRestrictionFieldConstraint.getRequiredDeclarations(MultiRestrictionFieldConstraint.java:73)
at org.drools.rule.Pattern.setConstraintType(Pattern.java:358)
at org.drools.rule.Pattern.addConstraint(Pattern.java:226)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:432)
at org.drools.rule.builder.PatternBuilder.buildConstraint(PatternBuilder.java:264)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:213)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:108)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:78)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1203)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:629)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:451)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at org.drools.examples.sudoku.rules.DroolsUtil.readKnowledgeBase(DroolsUtil.java:33)
at org.drools.examples.sudoku.Main.<init>(Main.java:87)
at org.drools.examples.sudoku.Main.main(Main.java:68)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: