Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10146

Improve exceptions for multi-operand expressions

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2 GA
    • Fix Version/s: 3.2.1
    • Component/s: Core:SpEL
    • Labels:
      None

      Description

      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).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwebb Phil Webb
                Reporter:
                grussell Gary Russell
                Last updater:
                Juergen Hoeller
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 19 weeks, 6 days ago