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

        Issue Links

          Activity

          Hide
          pwebb Phil Webb added a comment -

          This has been fixed for 3.2.1. Since this is a minor issues I am not planning to backport to 3.1.

          Show
          pwebb Phil Webb added a comment - This has been fixed for 3.2.1. Since this is a minor issues I am not planning to backport to 3.1.

            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:
                3 years, 47 weeks, 1 day ago