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. Issue: SPR-9613
This commit is contained in:
committed by
Sam Brannen
parent
529e62921d
commit
a7418f480c
@@ -513,7 +513,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser {
|
||||
private boolean maybeEatNullReference() {
|
||||
if (peekToken(TokenKind.IDENTIFIER)) {
|
||||
Token nullToken = peekToken();
|
||||
if (!nullToken.stringValue().equals("null")) {
|
||||
if (!nullToken.stringValue().toLowerCase().equals("null")) {
|
||||
return false;
|
||||
}
|
||||
nextToken();
|
||||
|
||||
Reference in New Issue
Block a user