[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1747) Null pointer exception from AbstractRuleBase.addPackage when loading rules scoped with parens
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Wed Nov 26 10:50:51 EST 2008
[ https://jira.jboss.org/jira/browse/JBRULES-1747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edson Tirelli updated JBRULES-1747:
-----------------------------------
Fix Version/s: 5.0.0.CR1
(was: 5.0.0.M3)
> Null pointer exception from AbstractRuleBase.addPackage when loading rules scoped with parens
> ---------------------------------------------------------------------------------------------
>
> Key: JBRULES-1747
> URL: https://jira.jboss.org/jira/browse/JBRULES-1747
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler, drools-core (expert)
> Affects Versions: 5.0.0.M2, FUTURE
> Environment: Windows XP, 1.5.0_12, drools trunk rev 21627
> Reporter: Joe White
> Assignee: Edson Tirelli
> Fix For: 5.0.0.CR1
>
>
> The drl below produces a null pointer exception when calling ruleBase.addPackage(Drl). If the extra parens after the "||" are removed the exception doesn't occur. The rule compiles and runs successfully in 5.0M1.
> /***********EXCEPTION****************************/
> java.lang.NullPointerException
> at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:418)
> at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:380)
> at com.sample.DroolsTest.readRule(DroolsTest.java:75)
> at com.sample.DroolsTest.main(DroolsTest.java:26)
> /*************************************************/
> /*********TEST DRL****************************/
> package test;
> import com.sample.TestInput;
> rule "TestRule"
> when
> TestInput( valOne ==true ||(valOne==false && doubVal ==0) )
> then
>
> end
> /*************************************************/
> /***********************TEST INPUT JAVA***********************/
> package com.sample;
> public class TestInput {
> public boolean valOne;
> public boolean valTwo;
> public double doubVal;
>
> public boolean getValOne() {
> return valOne;
> }
> public void setValOne(boolean valOne) {
> this.valOne = valOne;
> }
> public boolean getValTwo() {
> return valTwo;
> }
> public void setValTwo(boolean valTwo) {
> this.valTwo = valTwo;
> }
> public double getDoubVal() {
> return doubVal;
> }
> public void setDoubVal(double doubVal) {
> this.doubVal = doubVal;
> }
> }
--
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
More information about the jboss-jira
mailing list