You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/07/12 04:32:13 UTC

[GitHub] [ozone] sky76093016 opened a new pull request #2405: Fix potential BigDecimal precision in StorageUnit.java

sky76093016 opened a new pull request #2405:
URL: https://github.com/apache/ozone/pull/2405


   ## What changes were proposed in this pull request?
   
   Because of floating point imprecision, you’re unlikely to get the value you expect from the `BigDecimal(double)` constructor.
   
   Instead, you should use `BigDecimal.valueOf`, which uses a string under the covers to eliminate floating point rounding errors.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/projects/HDDS/issues/HDDS-5428
   
   ## How was this patch tested?
   
   No need.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] cku328 merged pull request #2405: HDDS-5428. Fix potential BigDecimal precision in StorageUnit.java

Posted by GitBox <gi...@apache.org>.
cku328 merged pull request #2405:
URL: https://github.com/apache/ozone/pull/2405


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org