DecimalFormat should fail gracefully with empty string currency

Description

The ICU DecimalFormat setCurrency docs says:

However, my code in ICU 62 was written erroneously assuming that the string is always either nullptr or a valid 3-character code. A test case came up in which a user was calling the API with the empty string, causing a hard-to-debug test failure that didn't always reproduce.

The fix is simple, and I will commit it to this ticket in a few minutes.

Status

Assignee

Shane Carr

Reporter

Shane Carr

Labels

Reviewer

Markus Scherer

Time Needed

None

Start date

None

Components

Fix versions

Priority

major
Configure