Better up-front validation of some out of bounds parameters. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
------------- Commit messages: - 8383605 Changes: https://git.openjdk.org/jdk/pull/31014/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31014&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8383605 Stats: 67 lines in 2 files changed: 66 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/31014.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31014/head:pull/31014 PR: https://git.openjdk.org/jdk/pull/31014
