[jboss-jira] [JBoss JIRA] (JBRULES-3415) NPE in RuleTerminalNode when a rule insert a new object and a subsequent one modifies it

Mario Fusco (JIRA) jira-events at lists.jboss.org
Thu Mar 8 12:38:36 EST 2012


Mario Fusco created JBRULES-3415:
------------------------------------

             Summary: NPE in RuleTerminalNode when a rule insert a new object and a subsequent one modifies it
                 Key: JBRULES-3415
                 URL: https://issues.jboss.org/browse/JBRULES-3415
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Mario Fusco
            Assignee: Mario Fusco


Executing both of the following rules causes an NPE in RuleTerminalNode.java:

rule "addSet"
no-loop true
when
    $ms: MySet()
then
    modify( $ms ){ add( "three", "four" ) }
    insert( new MySet( "x", "y" ) );
end

rule "xySet"
no-loop true
when
    $ms: MySet()
then
      modify( $ms ){ add( "z" ) }
end

import java.util.*;
public class MySet {
    Set<String> set = new HashSet<>();
    public MySet( String... strings ){
       add( strings );
    }
    public void add( String... strings ){
        for( String s: strings ){
            set.add( s );
}
    }
}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list