Skip to content

SpEL should support case-insensitive null literals [SPR-9613] #14247

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

Closed
spring-projects-issues opened this issue Jul 20, 2012 · 2 comments
Closed
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jul 20, 2012

Sam Brannen opened SPR-9613 and commented

Status Quo

SpEL supports boolean literal values true and false in a case-insensitive manner; however, null literals must currently be lowercase.

For example, the following code results in a SpelEvaluationException instead of result equaling null.

ExpressionParser parser = new SpelExpressionParser();
Expression exp = parser.parseExpression("NULL");
Object result = exp.getValue();

Deliverables

  1. Ensure that null literals are interpreted in a case-insensitive manner, analogous to the current support for boolean literals.

Affects: 3.0 GA, 3.1.2

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Andy Clement commented

Pull request submitted: #113

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

Completed as described in the comments for GitHub commit 3fbcebb82e:

Support case-insensitive null literals in SpEL

Prior to this commit null literals in SpEL expressions had to be
specified as "null" (i.e., all lowercase).

With this commit null literals in SpEL expressions are interpreted in a
case-insensitive manner, analogous to the current support for boolean
literals.

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: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants