You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (Jira)" <ji...@apache.org> on 2021/08/12 23:22:00 UTC

[jira] [Updated] (BEAM-12755) Clean-up HistogramData to not throw errors during formatting

     [ https://issues.apache.org/jira/browse/BEAM-12755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kenneth Knowles updated BEAM-12755:
-----------------------------------
    Status: Open  (was: Triage Needed)

> Clean-up HistogramData to not throw errors during formatting
> ------------------------------------------------------------
>
>                 Key: BEAM-12755
>                 URL: https://issues.apache.org/jira/browse/BEAM-12755
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Luke Cwik
>            Assignee: Luke Cwik
>            Priority: P3
>
> HistogramData throws an exception because DoubleMath.roundToInt throws an arithmetic exception when infinity is used.
> Instead use String.format with %.0f formatting since it will appropriately format Inf, -Inf and NaN. It already used HALF_UP rounding as well as per the javadoc.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)