diff --git a/jdk/src/java.base/share/classes/java/util/Locale.java b/jdk/src/java.base/share/classes/java/util/Locale.java index 23417394030..6567ab02bb4 100644 --- a/jdk/src/java.base/share/classes/java/util/Locale.java +++ b/jdk/src/java.base/share/classes/java/util/Locale.java @@ -2858,6 +2858,8 @@ public final class Locale implements Cloneable, Serializable { * @param range a language range * @throws NullPointerException if the given {@code range} is * {@code null} + * @throws IllegalArgumentException if the given {@code range} does not + * comply with the syntax of the language range mentioned in RFC 4647 */ public LanguageRange(String range) { this(range, MAX_WEIGHT); @@ -2873,8 +2875,10 @@ public final class Locale implements Cloneable, Serializable { * {@code MAX_WEIGHT} * @throws NullPointerException if the given {@code range} is * {@code null} - * @throws IllegalArgumentException if the given {@code weight} is less - * than {@code MIN_WEIGHT} or greater than {@code MAX_WEIGHT} + * @throws IllegalArgumentException if the given {@code range} does not + * comply with the syntax of the language range mentioned in RFC 4647 + * or if the given {@code weight} is less than {@code MIN_WEIGHT} + * or greater than {@code MAX_WEIGHT} */ public LanguageRange(String range, double weight) { if (range == null) {