On Thu, 5 Mar 2026 09:17:53 GMT, Mikhail Yankelevich <[email protected]>
wrote:
>> Shawn Emery has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Add unit test for negative offsets
>
> src/java.base/share/classes/javax/crypto/spec/DESKeySpec.java line 209:
>
>> 207: *
>> 208: * @param key the buffer with the DES key material.
>> 209: * @param offset the offset in <code>key</code>, where the DES key
>
> nit: I know this is obvious, so feel free to ignore it if you think it's
> fine. But I would personally mention that the offset should be positive just
> in case
@myankelev I think there's precedence that `@param` offsets are not necessarily
described as positive or negative.
> src/java.base/share/classes/javax/crypto/spec/DESKeySpec.java line 224:
>
>> 222: throw new InvalidKeyException("null key");
>> 223: }
>> 224: if (offset < 0) {
>
> I believe this change needs to have an associated test. Could you please add
> one? I personally can't find anything testing it explicitly now
Good catch! Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30069#discussion_r2893110708
PR Review Comment: https://git.openjdk.org/jdk/pull/30069#discussion_r2893110497