From 1f063251429a3f6fc1d76911ed7802ad3108a546 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Mon, 9 Oct 2023 16:29:40 +0000 Subject: [PATCH] 8317471: ListFormat::parseObject() spec can be improved on parsePosition valid values Reviewed-by: iris, lancea, joehw, mli --- src/java.base/share/classes/java/text/ListFormat.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/java.base/share/classes/java/text/ListFormat.java b/src/java.base/share/classes/java/text/ListFormat.java index a3d54b16119..d0b1b2aaf2a 100644 --- a/src/java.base/share/classes/java/text/ListFormat.java +++ b/src/java.base/share/classes/java/text/ListFormat.java @@ -416,6 +416,8 @@ public final class ListFormat extends Format { * @return A list of string parsed from the {@code source}. * In case of error, returns null. * @throws NullPointerException if {@code source} or {@code parsePos} is null. + * @throws IndexOutOfBoundsException if the starting index given by + * {@code parsePos} is outside {@code source}. */ @Override public Object parseObject(String source, ParsePosition parsePos) {