Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Expression language not compare BigDecimals with integers [SPR-8716] #13358
The number comparison can be more accurate with BigDecimals (possibly also BigIntegers) and other number types:
This test fail, becouse the BigDecimal is converted to Integer, truncating the value to zero:
The responsible is the class org.springframework.expression.spel.ast.OpGT (but all the similar classes has the same imprinting)
In order you:
I attach my modest suggestion
Giovanni Dall'Oglio Risso commented
I'm the reporter for this issue.
We managed to solve this problem, adding BigDecimals; we also made a pull request: #54
You can take that pull request, or start by that code (we added quite test cases).
PS: maybe you can consider to add also the BigIntegers support...