OpenJDK 17: java.lang.IndexOutOfBoundsException (ctor)
This is part of merging upstream changes from OpenJDK 17.0.3-ga. This CL
imports new ctor(long) for IndexOutOfBoundsException class.
Bug: 241558442
Test: treehugger
Change-Id: Ide25c641bb139a2d2ab5975f73f8638429495c98
diff --git a/api/current.txt b/api/current.txt
index 1fe401c..3281457 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -3183,6 +3183,7 @@
ctor public IndexOutOfBoundsException();
ctor public IndexOutOfBoundsException(String);
ctor public IndexOutOfBoundsException(int);
+ ctor public IndexOutOfBoundsException(long);
}
public class InheritableThreadLocal<T> extends java.lang.ThreadLocal<T> {
diff --git a/ojluni/src/main/java/java/lang/IndexOutOfBoundsException.java b/ojluni/src/main/java/java/lang/IndexOutOfBoundsException.java
index 88a4bb4..a0e338e 100644
--- a/ojluni/src/main/java/java/lang/IndexOutOfBoundsException.java
+++ b/ojluni/src/main/java/java/lang/IndexOutOfBoundsException.java
@@ -68,4 +68,18 @@
public IndexOutOfBoundsException(int index) {
super("Index out of range: " + index);
}
+
+ /**
+ * Constructs a new {@code IndexOutOfBoundsException} class with an
+ * argument indicating the illegal index.
+ *
+ * <p>The index is included in this exception's detail message. The
+ * exact presentation format of the detail message is unspecified.
+ *
+ * @param index the illegal index.
+ * @since 16
+ */
+ public IndexOutOfBoundsException(long index) {
+ super("Index out of range: " + index);
+ }
}