MessageFormat should allow and trim whitespace around argument number/name

Description

Deleted Component: formatting

MessageFormat.applyPattern() fails with a pattern like "a { 0 , number , '#,#'#.0 } z" because it forbids leading and trailing whitespace around the argument number (here 0) or name. By contrast, the argument type ("number") is trimmed, and whitespace in the argument style/pattern is allowed, retained and usually output.

For some better consistency and ease of use, we should allow and ignore leading and trailing whitespace around an argument number/name.

Activity

Show:
TracBot
July 1, 2018, 12:11 AM
Trac Comment 3 by —2011-04-08T19:09:30.275Z

Part of ticket #8319 implementation.

TracBot
July 1, 2018, 12:11 AM
Trac Comment 5 by —2011-04-22T23:10:26.098Z

Tests: r29860 & r29861

Fixed

Assignee

Markus Scherer

Reporter

Markus Scherer

Components

None

Labels

None

Reviewer

None

Priority

minor

Time Needed

Hours

Fix versions