[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-951) Strange NullPointerException in rule compilation with Iterator in RHS

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Sun Jul 1 13:14:15 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-951?page=all ]

Edson Tirelli resolved JBRULES-951.
-----------------------------------

    Fix Version/s:  4.0.0.MR4
       Resolution: Done

Fixed a problem when parsing java code blocks.

Thank you for reporting and let us know if you face any other problem.


> Strange NullPointerException in rule compilation with Iterator in RHS
> ---------------------------------------------------------------------
>
>                 Key: JBRULES-951
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-951
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions:  4.0.0.MR3
>         Environment: IBM RAD 7
>            Reporter: Alexandre Gattiker
>         Assigned To: Edson Tirelli
>             Fix For:  4.0.0.MR4
>
>
> Create a new Rules Project
> In Sample.drl add "import java.util.*;" at the top, and within the consequence block of one of the two rules:
> ArrayList list = new ArrayList();
> for (Iterator iter = list.iterator(); iter.hasNext();)
> {
> }
> Eclipse reports a problem:
> Severity and Description	Path	Resource	Location	Creation Time	Id
> Error: java.lang.NullPointerException	droolstest6/src/rules	Sample.drl	Unknown	1182938042901	228615
> When executing DroolsTest I get:
> java.lang.NullPointerException
> 	at org.drools.rule.builder.dialect.java.JavaConsequenceBuilder.build(JavaConsequenceBuilder.java:54)
> 	at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:67)
> 	at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:390)
> 	at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:264)
> 	at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:147)
> 	at com.sample.DroolsTest.readRule(DroolsTest.java:54)
> 	at com.sample.DroolsTest.main(DroolsTest.java:21)
> With 4.0.0.MR2 the bug does not happen.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list