You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .
The handling for nulls does seem the wrong way round here, so I have fixed it (basically reversed it). Although I have fixed this you will still find that because 'null<SomethingNotNull' returns true (i.e. basically nothing IS less than something), if your selection involves a < then you are going to see the null entries in your result. Typically we have taken the same approach as groovy here and this groovy program will print "true, true, false" for the <'hhh' comparison:
Uh oh!
There was an error while loading. Please reload this page.
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:
The text was updated successfully, but these errors were encountered: