-
Enhancement
-
Resolution: Done
-
Minor
-
None
-
None
The ExpressionResolver interface declares that the resolveExpression methods will not return null. But some impls intended to handle only certain kinds of expressions do return null, and doing so is useful for how they are used, as doing so indicates that they didn't recognize the input string as valid for the kind of expression they're meant to resolve. RuntimeExpressionResolver relies on this behavior as it uses plugged in resolvers.
This should be clarified, perhaps by adding a different interface for these plugin resolvers that uses a different semantic, or perhaps by modifying ExpressionResolver to note that null can be returned, but also adding a boolean method that declares whether a particular impl object will do so. Callers that don't want null could reject use of impls that return null. The different interface approach sounds much better from a proper OO design point of view.