In a recent inspection of all methods that accept an `int` argument in the 
Class-File API, I noticed this method that validates its argument but did not 
document the validation. The behavior is to throw IOOBE. We can simply document 
this behavior and enhance existing tests to verify exceptional behaviors in 
addition to anticipated outputs.

This is doc plus test only, so should be eligible for backport regardless of 
priority. A CSR will be created to track this new assertion in the spec.

Testing: jdk/jdk/classfile/BuilderParamTest.java

-------------

Commit messages:
 - 8361615: CodeBuilder::parameterSlot throws undocumented IOOBE

Changes: https://git.openjdk.org/jdk/pull/26200/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26200&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8361615
  Stats: 10 lines in 2 files changed: 9 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26200.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26200/head:pull/26200

PR: https://git.openjdk.org/jdk/pull/26200

Reply via email to