[jboss-jira] [JBoss JIRA] Created: (JBRULES-2160) CLONE -Use of reserved word as bound variable in a pattern results as NPE

Neil Wallace (JIRA) jira-events at lists.jboss.org
Tue Jul 7 08:04:51 EDT 2009


CLONE -Use of reserved word as bound variable in a pattern results as NPE
-------------------------------------------------------------------------

                 Key: JBRULES-2160
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2160
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler
    Affects Versions: 4.0.2
         Environment: Eclipse 3.2, Windows XP
            Reporter: Neil Wallace
            Assignee: Edson Tirelli
             Fix For: 5.0.1.FINAL


example:

rule "This generates an NPE"
	when
		result : ReservedWordNPEFact(data < 15)
	then
		result.setData(new Integer(1));	 
end

At least in the eclipse IDE, this generates an NPE.  Change result to something like:


rule "This generates an NPE"
	when
		f: ReservedWordNPEFact(data < 15)
	then
		f.setData(new Integer(1));	 
end

and it goes away.

-- 
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