-
Sub-task
-
Resolution: Delivered
-
P4
-
23
`MessageFormat` objects are created from pattern strings that contain nested subformat patterns. Conversely, the `MessageFormat.toPattern()` instance method returns a pattern string that should be equivalent, though not necessarily identical, to the original. However, if a nested subformat pattern contained a quoted (that is, intended to be plain text) opening or closing curly brace character (`{` or `}`), in some cases that quoting could be incorrectly omitted in the pattern string.
As a result of this bug, creating a new `MessageFormat` from that pattern could fail to parse correctly, throwing an exception, or parse differently, resulting in a new instance that was not equivalent to the original.
This problem has now been fixed. The fix does not change the behavior of `MessageFormat` objects whose `MessageFormat.toPattern()` output was already correctly quoted.
As a result of this bug, creating a new `MessageFormat` from that pattern could fail to parse correctly, throwing an exception, or parse differently, resulting in a new instance that was not equivalent to the original.
This problem has now been fixed. The fix does not change the behavior of `MessageFormat` objects whose `MessageFormat.toPattern()` output was already correctly quoted.