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.

Environment

Status

Assignee

Shane Carr

Reporter

Shane Carr

tracCreated

Apr 18, 2017, 9:20 PM

tracOwner

shane

tracProject

all

tracReporter

shane

tracResolution

fixed

tracReviewer

andy

tracStatus

closed

Components

Fix versions

Priority

critical