RFR: 8267068: Incomplete @throws javadoc for various javax.crypto.spec classes

Valerie Peng valeriep at openjdk.org
Wed Feb 12 21:12:17 UTC 2025


On Sat, 18 Jan 2025 00:14:58 GMT, Mark Powers <mpowers at openjdk.org> wrote:

> [JDK-8267068](https://bugs.openjdk.org/browse/JDK-8267068)

src/java.base/share/classes/javax/crypto/spec/IvParameterSpec.java line 73:

> 71:      * or {@code (iv.length - offset < len)}
> 72:      * @throws ArrayIndexOutOfBoundsException if {@code offset}
> 73:      * or {@code len} index bytes outside the {@code iv}.

`RC2ParameterSpec(int, byte[], int)` ctor should be documented with AIOOBE as well. If you pass a negative offset into it, AIOOBE is thrown by the `System.arraycopy()` call.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23188#discussion_r1953402235


More information about the security-dev mailing list