Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-6482

NullSafeDereferencing without predicate misses null check in exec-model

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.59.0.Final
    • 7.56.0.Final
    • executable model
    • None
    • 2021 Week 25-27 (from Jun 21), 2021 Week 28-30 (from Jul 12), 2021 Week 31-33 (from Aug 2)
    • 3
    • Undefined
    • NEW
    • NEW

    Description

      In exec-model,

      rule R1 when
         Person( $streetName : address!.street ) 
      then
        System.out.println($streetName);
      end
      

      actually misses null check so a Fact with address = null matches the rule and throws NPE when accessing $streetName.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: