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

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

Jacques Le Roux commented on OFBIZ-9572:
----------------------------------------

BTW I wonder if ZERO.setScale() should not be used everywhere. But then, and anyway, the setScale()
variant should be the one which use the RoundingMode class and not an int.

> 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