We're updating the issue view to help you get more done. 

ArithmeticException thrown in CompactDecimalFormat

Description

It happens when you try to format a small fraction with a CompactDecimalFormat, which is apparently not something we cover in our test suite. Reproducible test case:

1 2 3 4 5 ULocale loc = ULocale.ENGLISH; CompactDecimalFormat cdf = CompactDecimalFormat.getInstance(loc, CompactStyle.SHORT); cdf.setMaximumFractionDigits(1); String result = cdf.format(0.01); assertEquals("Should not throw exception on small number", "0", result);

I'm working on a patch. It would be good to get this one into the maintenance branch.

Status

Assignee

Shane Carr

Reporter

Shane Carr

Reviewer

None

Time Needed

None

Start date

None

Components

Fix versions

Priority

critical