On Wed, 12 Feb 2025 18:37:38 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> 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}.
>> 
>> can you fix this grammatical issue while you are changing this:
>> 
>> s/outside/are outside/
>
> Maybe we should just state that ArrayIndexOutOfBoundsException is thrown if 
> `offset` or `len` is negative? The current wording for AIOOBE seems to 
> suggest that it covers the case when `offset` or `len` is too large. But that 
> is covered by the IAE.

`SecretKeySpec` constructor has this same wording for AIOOBE, so if we change 
to cover negative value only, we should apply the same change to 
`SecretKeySpec` as well.

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

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

Reply via email to