RFR: 8361615: CodeBuilder::parameterSlot throws undocumented IOOBE

Chen Liang liach at openjdk.org
Wed Jul 9 19:39:47 UTC 2025


On Tue, 8 Jul 2025 18:46:00 GMT, Chen Liang <liach at openjdk.org> wrote:

> 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

Opened PR #26226 for backport to JDK 25.

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

PR Comment: https://git.openjdk.org/jdk/pull/26200#issuecomment-3053782525


More information about the core-libs-dev mailing list