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] [Comment Edited] (OFBIZ-9572) Replace all "BigDecimal ZERO" by BigDecimal.ZERO
Date Mon, 14 Aug 2017 15:33:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-9572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125841#comment-16125841
] 

Jacques Le Roux edited comment on OFBIZ-9572 at 8/14/17 3:32 PM:
-----------------------------------------------------------------

Thanks Gil,

Indeed I finally see no reasons to use setScale() on BigDecimal.ZERO. It's the _"deep"_ zero
and nothing can change it (thanks to Indians who gave us zero long ago). For the rest we need
to check if setScale() is correctly used everywhere...


was (Author: jacques.le.roux):
Thanks Gil,

Indeed I finally see no reasons to use setScale() on BigDecimal.ZERO. It's the _"deep"_ zero
and nothing can change it (thanks to Indians who gave us zero long ago). For the rest we need
to check if is correctly used everywhere...

> 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
>
> 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.
> This should not be done when setScale() is used on the ZERO constant



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message