Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.2.1
-
None
Description
WHAT
A JexlArithmetic declares its behaviour with respect to null arguments using the strict flag. When strict, no operator is null-safe and each should consider a null argument as an error.
It can not strictly be the case since '==' must be able to use null as argument.
There are cases where one would like to retain 'strictness' for most operators but relax the behaviour for a few. A typical case is '+' for string and null where one would like to consider null as a valid argument even if arithmetic is strict.
HOW
There is already a scaffolding for this feature with the OperatorController. Refining it to associate the operator to a syntactic node allows controlling whether the interpretation of that node will tolerate null arguments before it is called.
An overridable method in the JexlArithmetic to determine whether an operator is strict or null-safe exposes the intent (isStrict(JexlOperator)).
Attachments
Issue Links
- relates to
-
JEXL-384 Improve control over JexlArithmetic null argument handling
- Closed