Details

      Description

      When doing number arithmetic in SpEL the result type is apparently one of double, long or int.
      This has the unwanted effect that for example float or BigDecimal values will be changed to int.

      new java.math.BigDecimal("12.34")
      evaluates to 12.34

      -(new java.math.BigDecimal("12.34"))
      evaluates to -12

      see org.springframework.expression.spel.ast
      OpPlus, OpMinus, OpMultiply, OpDivide

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwebb Phil Webb
                Reporter:
                obecker Oliver Becker
                Last updater:
                Juergen Hoeller
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 22 weeks, 6 days ago