Introduce common support for is-null-safe checks in SpEL nodes #32516
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Overview
MethodReference
andPropertyOrFieldReference
already define localisNullSafe()
methods, but we now need identical methods inSelection
,Projection
, andIndexer
, and we may potentially need null-safe support for additional operators in the future.However, doing so without a common mechanism will result in an if-block that's required to check each concrete node type separately.
In other words, the current if-block:
spring-framework/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java
Lines 127 to 128 in b1b9ee0
... would grow to something similar to the following:
Whereas, something unified like the following would be preferred.
Prerequisite For
CompoundExpression
omits null-safe syntax in AST string representation of null-safe selection/projection in SpEL #32515The text was updated successfully, but these errors were encountered: