Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1287

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

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.0.1.FINAL
    • 4.0.2
    • drools-compiler
    • None

      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.

              etirelli@redhat.com Edson Tirelli
              justinwick_jira Justin Wick (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

                Created:
                Updated:
                Resolved:
                Archived: