[
http://jira.jboss.com/jira/browse/JBRULES-1644?page=comments#action_12417219 ]
Mark Proctor commented on JBRULES-1644:
---------------------------------------
anything with nest values is MVEL, so we don't have control over that. We do safe null
handling on anything that is a direct field of an object, for nested objects everything is
delegated to MVEL.
Make drools imply null checks before trying to read a value
-----------------------------------------------------------
Key: JBRULES-1644
URL:
http://jira.jboss.com/jira/browse/JBRULES-1644
Project: JBoss Drools
Issue Type: Feature Request
Components: Drl Parser/Builder
Affects Versions: 4.0.6
Environment: all
Reporter: Alex McCarrier
Assigned To: Mark Proctor
Priority: Minor
Fix For: FUTURE
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
Not sure if this is MVEL or drools itself, but it would be nice if it would do null
checks on fields for you rather than having the rule author do it. Example, when doing
something like:
when
Object(value1.value2 == something)
before attempting to read value2 it makes sure value1 is not null, and if value1 is null
than rather than throwing an error like it does currently, just consider the rule as not
matching.
--
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