From b840b130df7ccb64d4615460c0654a6315e9302f Mon Sep 17 00:00:00 2001 From: Justin Lu Date: Fri, 30 Aug 2024 18:28:53 +0000 Subject: [PATCH] 8338882: Clarify matching order of MessageFormat subformat factory styles Reviewed-by: naoto --- src/java.base/share/classes/java/text/MessageFormat.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/java.base/share/classes/java/text/MessageFormat.java b/src/java.base/share/classes/java/text/MessageFormat.java index b2dd7a51251..58872834567 100644 --- a/src/java.base/share/classes/java/text/MessageFormat.java +++ b/src/java.base/share/classes/java/text/MessageFormat.java @@ -692,7 +692,10 @@ public class MessageFormat extends Format { * represents the current state of this {@code MessageFormat}} * * The string is constructed from internal information and therefore - * does not necessarily equal the previously applied pattern. + * does not necessarily equal the previously applied pattern. The order of + * {@code FormatStyle} matching is not guaranteed. That is, a {@code + * FormatStyle} produced may not be equivalent to the corresponding style passed, + * in the instance that multiple styles are equivalent. * * @implSpec The implementation in {@link MessageFormat} returns a * string that, when passed to a {@code MessageFormat()} constructor