Description
kailash pandey opened SPR-7840 and commented
While evaulating a Selection expression like -->
"#root.?[someproperty_Of_Type_X > someobject_Of_Type_X]",
where #root is a List<ApplicationObject>,
If the property on left hand side is null, then SpEL evaulates this condition as TRUE (ideally which should not be the case, u can't evaluate to true with null) and returns such underlying objects as part of Selection result.
Bigger problem arises when similar expression (as mentioned above) are tested with other operators like less than "<" or equals "==", SpEL treats them differently i.e. somehow it evaluates them as FALSE and as a result such underlying objects are eliminated from Selection result.
This is causing big problems in evaluating complex expressions and thus introducing misleading results.
Request to evaulate the problem stated above and provide solution to it .
Kailash
Affects: 3.0.2
Issue Links:
- Doc: SpEL behavior when comparing value to null [SPR-14361] #18933 Doc: SpEL behavior when comparing value to null