ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Le Roux (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OFBIZ-9572) Replace all "BigDecimal ZERO" by BigDecimal.ZERO
Date Tue, 13 Feb 2018 12:50:00 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-9572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jacques Le Roux closed OFBIZ-9572.
----------------------------------
       Resolution: Implemented
    Fix Version/s: Upcoming Branch

Completed: At revision: 1824127  

> Replace all "BigDecimal ZERO" by BigDecimal.ZERO
> ------------------------------------------------
>
>                 Key: OFBIZ-9572
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9572
>             Project: OFBiz
>          Issue Type: Improvement
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Major
>             Fix For: Upcoming Branch
>
>
> 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-9571 we must always use the setScale() variant with integer but
the one with RoundingMode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message