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

Error message on invalid decimal format patterns is different

Description

Code:

1 2 3 4 5 try { DecimalFormat df = new DecimalFormat("1##"); } catch (IllegalArgumentException e) { System.out.println(e); }

ICU 58 output:

java.lang.IllegalArgumentException: Malformed pattern in pattern "1##"

ICU 59 output:

java.lang.IllegalArgumentException: Unexpected character in decimal format pattern: '1##': # cannot follow 0 before decimal point: '#'

ICU 59 breaks people who were checking the error message string for the literal string "malformed pattern".

'''My opinion:''' It would be nice for the error message to be somewhat stable. Re-add the string "Malformed pattern" in the error message for ICU 59 GA.

GoogleIssue:37157099

Status

Assignee

Shane Carr

Reporter

Shane Carr

Reviewer

None

Time Needed

None

Start date

None

Components

Fix versions

Priority

major