Luke Cwik created BEAM-12755:
--------------------------------

             Summary: 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


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)

Reply via email to