[JIRA] Closed: (OFBIZ-779) Re-factor BigDecimal calculations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Closed: (OFBIZ-779) Re-factor BigDecimal calculations

JIRA jira@ofbiz.org
     [ http://jira.undersunconsulting.com/browse/OFBIZ-779?page=all ]
     
Jacopo Cappellato closed OFBIZ-779:
-----------------------------------

    Resolution: Duplicate

https://issues.apache.org/jira/browse/OFBIZ-249

> Re-factor BigDecimal calculations
> ---------------------------------
>
>          Key: OFBIZ-779
>          URL: http://jira.undersunconsulting.com/browse/OFBIZ-779
>      Project: [OFBiz] Open For Business
>         Type: Improvement
>   Components: accounting, order
>     Versions: SVN
>     Reporter: Si Chen
>     Assignee: Jira Administrator
>     Priority: Minor
>      Fix For: SVN

>
>
> 1.  In applications/accounting/src/ re-factor to use arithmetic.properties instead of
> 2.  Per comments of Bradley Plies,
> The following files have something like:
>  ... = new BigDecimal("0");
> \applications\accounting\src\org\ofbiz\accounting
>    \invoice\InvoiceServices.java (11 matches)
>    \invoice\InvoiceWorker.java (4 matches)
>    \payment\PaymentWorker.java
>    \tax\TaxAuthorityServices.java
> \applications\accounting\webapp\accounting\WEB-INF\actions\invoice\createItemList.bsh (4 matches)
> \applications\order\src\org\ofbiz\order
>    \order\OrderReadHelper.java
>    \order\OrderReturnServices.java
>    \shoppingcart\CheckOutHelper.java
> However BigDecimal already provides a constant BigDecimal.ZERO (as well as BigDecimal.ONE which are both inherited from superclass BigInteger) such that doing this is unnecessary (but not incorrect) and just creates more objects.  The scale of the mathematical results will not be unaffected, as described in the JDK. http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.undersunconsulting.com/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira