Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032051Openbravo ERPA. Platformpublic2016-01-29 09:042022-02-01 08:05
alostale 
Triage Platform Base 
normalminorhave not tried
acknowledgedopen 
5
 
 
Core
No
0032051: review and remove occurrences of new BigDecimal(double)
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 [^]
-
Review the code for pi and retail looking for occurrences of this constructor and replace them by the safer BigDecimal.valueOf(double);
No tags attached.
duplicate of defect 0037230 closed shuehner JDK9: compilation warnings - Platform Team 
related to defect 0031901 closed caristu decimal value can't be changed by trigger/observer after manual edition in form view 
Issue History
2016-01-29 09:04alostaleNew Issue
2016-01-29 09:04alostaleAssigned To => platform
2016-01-29 09:04alostaleModules => Core
2016-01-29 09:04alostaleTriggers an Emergency Pack => No
2016-01-29 09:04alostaleRelationship addedrelated to 0031901
2016-01-29 09:04alostaleStatusnew => acknowledged
2016-12-01 13:24alostalePriorityhigh => normal
2017-11-06 13:00alostaleRelationship addedduplicate of 0037230
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.