Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006282Openbravo ERPA. Platformpublic2008-11-30 23:022009-03-06 12:34
mtaal 
AinhoaPagola 
highmajoralways
closedfixed 
5
 
 
Core
No
0006282: Openbravo source code contains examples of incorrect use of the BigDecimal setScale method
The BigDecimal setScale method does not change the BigDecimal but returns a new instance. There are several places in the Openbravo code where the return value is not used:
LineNetAmt.setScale(stdPrecision, BigDecimal.ROUND_HALF_UP);

The correct above code is:
LineNetAmt = LineNetAmt.setScale(stdPrecision, BigDecimal.ROUND_HALF_UP);

The occurrences of this error can be found by searching for:
setScale(
in the Openbravo source code tree
No tags attached.
Issue History
2008-11-30 23:02mtaalNew Issue
2008-11-30 23:02mtaalAssigned To => rafaroda
2008-11-30 23:02mtaalsf_bug_id0 => 2367121
2008-11-30 23:02mtaalRegression testing => No
2008-12-03 19:03pjuvaraPrioritynormal => high
2008-12-09 13:00pheenanAssigned Torafaroda => AinhoaPagola
2008-12-09 20:02svnbotCheckin
2008-12-09 20:02svnbotNote Added: 0011099
2008-12-09 20:02svnbotStatusnew => resolved
2008-12-09 20:02svnbotResolutionopen => fixed
2008-12-09 20:02svnbotsvn_revision => 11071
2009-03-06 12:34psarobeStatusresolved => closed

Notes
(0011099)
svnbot   
2008-12-09 20:02   
Repository: openbravo
Revision: 11071
Author: AinhoaPagola
Date: 2008-12-09 20:02:17 +0100 (Tue, 09 Dec 2008)

Fixes bug 0006282. Incorrect use of BigDecimal setScale method fixed.

---
U trunk/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
U trunk/src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java
U trunk/src/org/openbravo/erpCommon/ad_process/CreateCashFlowStatement.java
U trunk/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=11071&sc=1 [^]