Skip to content

Improve exceptions for multi-operand expressions [SPR-10146] #14779

@spring-projects-issues

Description

@spring-projects-issues

Gary Russell opened SPR-10146 and commented

Malformed SpEL Expression causes an NPE...

new SpelExpressionParser().parseExpression("/foo");


Exception in thread "main" java.lang.NullPointerException
	at org.springframework.expression.spel.ast.SpelNodeImpl.<init>(SpelNodeImpl.java:50)
	at org.springframework.expression.spel.ast.Operator.<init>(Operator.java:32)
	at org.springframework.expression.spel.ast.OpDivide.<init>(OpDivide.java:34)
	at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatProductExpression(InternalSpelExpressionParser.java:224)
...

(null left operand for divide operator).


Affects: 3.2 GA

Reference URL: http://forum.springsource.org/showthread.php?133818-Can-t-create-bean-of-FtpOutboundGateway

Issue Links:

Referenced from: commits bff36fb

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions