Overview

In gh-30371, @ryan-c-wicks brought it to our attention that null SpEL expressions were unintentionally supported prior to #30330.

For example, the following test passed.

    @Test
    void nullExpression() {
        ExpressionParser parser = new SpelExpressionParser();
        String expression = null;
        Expression expr = parser.parseExpression(expression);
        Object result = expr.getValue();
        assertThat(result).isNull();
    }

Since the 5.2.x branch is no longer actively maintained, we have decided to treat this as a "regression" for 5.2.x and will update the code to avoid a NullPointerException whenever the user supplies null as the SpEL expression.

Related Issues

  • 30330

  • 30371

Comment From: sbrannen

Closed via 89a3d64adafb4fc716473ad2d21f7b76ad63db2a