Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032051
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2016-01-29 09:042016-12-01 13:24
ReporteralostaleView Statuspublic 
Assigned Toplatform 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0032051: review and remove occurrences of new BigDecimal(double)

DescriptionLiteral 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 SolutionReview the code for pi and retail looking for occurrences of this constructor and replace them by the safer BigDecimal.valueOf(double);
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
duplicate of defect 0037230 closedshuehner JDK9: compilation warnings - Platform Team 
related to defect 0031901 closedcaristu decimal value can't be changed by trigger/observer after manual edition in form view 

-  Notes
There are no notes attached to this issue.

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker