From ca3bdfc0c7a74e23329cd9487279992e345b2efd Mon Sep 17 00:00:00 2001 From: Justin Lu Date: Wed, 25 Oct 2023 17:12:37 +0000 Subject: [PATCH] 8318186: ChoiceFormat inconsistency between applyPattern() and setChoices() Reviewed-by: naoto --- src/java.base/share/classes/java/text/ChoiceFormat.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/text/ChoiceFormat.java b/src/java.base/share/classes/java/text/ChoiceFormat.java index 538454d669a..6f27137ea0d 100644 --- a/src/java.base/share/classes/java/text/ChoiceFormat.java +++ b/src/java.base/share/classes/java/text/ChoiceFormat.java @@ -235,8 +235,9 @@ public class ChoiceFormat extends NumberFormat { /** * Apply the given pattern to this ChoiceFormat object. The syntax * for the ChoiceFormat pattern can be seen in the {@linkplain ##patterns - * Patterns} section. - * + * Patterns} section. Unlike {@link #setChoices(double[], String[])} this + * method will throw an {@code IllegalArgumentException} if the {@code + * limits} are not in ascending order. * @param newPattern a pattern string * @throws NullPointerException if {@code newPattern} * is {@code null}