Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | |||||||||||
0032051 | |||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2016-01-29 09:04 | 2022-02-01 08:05 | ||||||
Reporter | alostale | View Status | public | ||||||||
Assigned To | Triage Platform Base | ||||||||||
Priority | normal | Resolution | open | Fixed in Version | |||||||
Status | acknowledged | Fix in branch | Fixed in SCM revision | ||||||||
Projection | none | ETA | none | Target Version | |||||||
OS | Any | Database | Any | Java version | |||||||
OS Version | Database version | Ant version | |||||||||
Product Version | SCM revision | ||||||||||
Review Assigned To | |||||||||||
Web browser | |||||||||||
Modules | Core | ||||||||||
Regression level | |||||||||||
Regression date | |||||||||||
Regression introduced in release | |||||||||||
Regression introduced by commit | |||||||||||
Triggers an Emergency Pack | No | ||||||||||
Summary | 0032051: review and remove occurrences of new BigDecimal(double) | ||||||||||
Description | Literal decimal floating-point numbers cannot always be precisely represented as an IEEE 754 floating-point value. Consequently, the BigDecimal(double val) constructor must not be passed a floating-point literal as an argument when doing so results in an unacceptable loss of precision. [1][2] This constructor should be avoided. [1] https://www.securecoding.cert.org/confluence/display/java/NUM10-J.+Do+not+construct+BigDecimal+objects+from+floating-point+literals [^] [2] https://dev.eclipse.org/sonar/coding_rules#rule_key=squid%3AS2111|s=createdAt|asc=false [^] | ||||||||||
Steps To Reproduce | - | ||||||||||
Proposed Solution | Review the code for pi and retail looking for occurrences of this constructor and replace them by the safer BigDecimal.valueOf(double); | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2016-01-29 09:04 | alostale | New Issue | |
2016-01-29 09:04 | alostale | Assigned To | => platform |
2016-01-29 09:04 | alostale | Modules | => Core |
2016-01-29 09:04 | alostale | Triggers an Emergency Pack | => No |
2016-01-29 09:04 | alostale | Relationship added | related to 0031901 |
2016-01-29 09:04 | alostale | Status | new => acknowledged |
2016-12-01 13:24 | alostale | Priority | high => normal |
2017-11-06 13:00 | alostale | Relationship added | duplicate of 0037230 |
2022-02-01 08:05 | alostale | Assigned To | platform => Triage Platform Base |
Copyright © 2000 - 2009 MantisBT Group |