Skip to content

Support BigDecimals with SpEL [SPR-9164] #13802

@spring-projects-issues

Description

@spring-projects-issues

Oliver Becker opened SPR-9164 and commented

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


Affects: 3.1.1

Reference URL: #80

Attachments:

Issue Links:

1 votes, 7 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions