Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintroduce support for null SpEL expressions #30464

Closed
github-actions bot opened this issue May 10, 2023 · 1 comment
Closed

Reintroduce support for null SpEL expressions #30464

github-actions bot opened this issue May 10, 2023 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: backport An issue that is a backport of another issue to a maintenance branch type: regression A bug that is also a regression
Milestone

Comments

@github-actions
Copy link
Contributor

github-actions bot commented May 10, 2023

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

@github-actions github-actions bot added in: core Issues in core modules (aop, beans, core, context, expression) type: backport An issue that is a backport of another issue to a maintenance branch type: enhancement A general enhancement labels May 10, 2023
@github-actions github-actions bot added this to the 5.2.25 milestone May 10, 2023
@sbrannen sbrannen added type: regression A bug that is also a regression and removed type: enhancement A general enhancement labels May 10, 2023
@sbrannen sbrannen changed the title Reject null and empty SpEL expressions Reintroduce support for null SpEL expressions May 10, 2023
sbrannen added a commit that referenced this issue May 10, 2023
@sbrannen
Copy link
Member

Closed via 89a3d64

lakeslove pushed a commit to lakeslove/spring-framework that referenced this issue Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: backport An issue that is a backport of another issue to a maintenance branch type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

1 participant