Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Implemented
-
None
-
None
-
None
Description
Using "BigDecimal ZERO" instead of BigDecimal.ZERO does not add anything but more useless code. They are both constants and the compiler will made them so.
- But, like in any BigDecimal comparison, values compared to BigDecimal.ZERO must be weighted by using setScale()
- Like I did in
OFBIZ-9571we must always use the setScale() variant with integer but the one with RoundingMode.
Attachments
Issue Links
- is related to
-
OFBIZ-9571 [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
- Closed