forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reject null and empty SpEL expressions
Prior to spring-projectsgh-30325, supplying a null reference for a SpEL expression was effectively equivalent to supplying the String "null" as the expression. Consequently, evaluation of a null reference expression always evaluated to a null reference. However, that was accidental rather than by design. Due to the introduction of the checkExpressionLength(String) method in InternalSpelExpressionParser (in conjunction with spring-projectsgh-30325), an attempt to evaluate a null reference as a SpEL expression now results in a NullPointerException. To address both of these issues, TemplateAwareExpressionParser.parseExpression() and SpelExpressionParser.parseRaw() now reject null and empty SpEL expressions. Closes spring-projectsgh-30371
- Loading branch information
Showing
4 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters