-
Sub-task
-
Resolution: Delivered
-
P4
-
9
-
Verified
`java.util.logging.Formatter.formatMessage` API specification specified that `MessageFormat` would be called if the message string contained "{0". In practice `MessageFormat` was called if the message string contained either "{0", "{1", "{2" or "{3".
In Java SE 9, the specification and implementation of this method have been changed to call `MessageFormat` if the message string contains "{<i><digit></i>", where <i><digit></i> is in [0..9].
In practice, this should be transparent for calling applications.
The only case where an application might see a behaviour change is if the application passes a format string that does not contain any formatter of the form "{0", "{1", "{2" or "{3", but contains "{<i><digit></i>" with <i><digit></i> within [4..9], along with an array of parameters that contains at least <i><digit></i>+1 elements, and depends on `MessageFormat` not to be called. In that case the method will return a formatted message instead of the format string.
In Java SE 9, the specification and implementation of this method have been changed to call `MessageFormat` if the message string contains "{<i><digit></i>", where <i><digit></i> is in [0..9].
In practice, this should be transparent for calling applications.
The only case where an application might see a behaviour change is if the application passes a format string that does not contain any formatter of the form "{0", "{1", "{2" or "{3", but contains "{<i><digit></i>" with <i><digit></i> within [4..9], along with an array of parameters that contains at least <i><digit></i>+1 elements, and depends on `MessageFormat` not to be called. In that case the method will return a formatted message instead of the format string.