Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||
View Issue Details | |||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||
0006477 | Openbravo ERP | A. Platform | public | 2008-12-11 09:40 | 2009-03-03 17:16 | ||||||||||||||
Reporter | mtaal | ||||||||||||||||||
Assigned To | vmromanos | ||||||||||||||||||
Priority | high | Severity | major | Reproducibility | always | ||||||||||||||
Status | closed | Resolution | fixed | ||||||||||||||||
Platform | OS | 5 | OS Version | ||||||||||||||||
Product Version | |||||||||||||||||||
Target Version | Fixed in Version | ||||||||||||||||||
Merge Request Status | |||||||||||||||||||
Review Assigned To | |||||||||||||||||||
OBNetwork customer | |||||||||||||||||||
Web browser | |||||||||||||||||||
Modules | Core | ||||||||||||||||||
Support ticket | |||||||||||||||||||
Regression level | |||||||||||||||||||
Regression date | |||||||||||||||||||
Regression introduced in release | |||||||||||||||||||
Regression introduced by commit | |||||||||||||||||||
Triggers an Emergency Pack | No | ||||||||||||||||||
Summary | 0006477: Use of double instead of BigDecimal, double is very inprecise | ||||||||||||||||||
Description | There are a few cases in Openbravo source code where a double type is used. A double is far more in-precise than a BigDecimal. Always a BigDecimal should be used. See for example this code in the ReportGeneralLedger class: double amount = 0.0; for (int i=0;data2!=null && i<data2.length;i++){ if (data2[i].factAcctId.equals(data[0].factAcctId)) { if (log4j.isDebugEnabled()) log4j.debug("break i:"+i); break; }; // if (data2[i].id.equals(data[0].id)) if ((data2[i].partner.equals(data[0].partner) && (!(strcBpartnerId.equals("")&&(strAll.equals("")))))||(strcBpartnerId.equals("")&&(strAll.equals("")))) amount += Double.valueOf(data2[i].total).doubleValue(); } Here a BigDecimal should be used. Search for the use of double in the source tree and repair the incorrect uses. | ||||||||||||||||||
Steps To Reproduce | |||||||||||||||||||
Proposed Solution | |||||||||||||||||||
Additional Information | |||||||||||||||||||
Tags | No tags attached. | ||||||||||||||||||
Relationships |
| ||||||||||||||||||
Attached Files | |||||||||||||||||||
Issue History | |||||||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||||||
2008-12-11 09:40 | Dowid | New Issue | |||||||||||||||||
2008-12-11 09:40 | Dowid | Assigned To | => Dowid | ||||||||||||||||
2008-12-11 09:40 | Dowid | Status | new => scheduled | ||||||||||||||||
2009-01-08 10:28 | Dowid | Assigned To | Dowid => vmromanos | ||||||||||||||||
2009-01-09 18:22 | vmromanos | Relationship added | related to 0004512 | ||||||||||||||||
2009-01-09 18:34 | svnbot | Checkin | |||||||||||||||||
2009-01-09 18:34 | svnbot | Note Added: 0012070 | |||||||||||||||||
2009-01-09 18:34 | svnbot | Status | scheduled => resolved | ||||||||||||||||
2009-01-09 18:34 | svnbot | Resolution | open => fixed | ||||||||||||||||
2009-01-09 18:34 | svnbot | svn_revision | => 11782 | ||||||||||||||||
2009-03-03 17:16 | psarobe | Status | resolved => closed |
Notes | |||||
|
|||||
|
|