On Mon, 23 Jan 2023 02:35:19 GMT, Tingjun Yuan <[email protected]> wrote:
> Modify `java.util.Arrays.ArrayList.{set,replaceAll}` to throw a
> `ClassCastException` (as documented in `java.util.List`) when attempting to
> set an element with a wrong type.
We don't want to change long-standing exception-throwing behavior for these
cases. See my comments in
[JDK-8296935](https://bugs.openjdk.org/browse/JDK-8296935).
-------------
PR: https://git.openjdk.org/jdk/pull/12135
