RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider [v4]
Sean Mullan
mullan at openjdk.org
Tue Jul 2 16:53:24 UTC 2024
On Mon, 1 Jul 2024 16:46:05 GMT, Mark Powers <mpowers at openjdk.org> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java line 1261:
>>
>>> 1259: *
>>> 1260: * @throws ShortBufferException if there is insufficient room to
>>> 1261: * write the tag.
>>
>> From line 751, `engineUpdate` can throw `ShortBufferExc` but wraps it in a `ProviderException`. Is that case possible? If so, we should change the @throws spec to a `ProviderException` but remove it from the throws line since it is a runtime exc.
>
> You must mean line 651?
> I removed `ShortBufferException` from line 650 and got "unreported exception ShortBufferException; must be caught or declared to be thrown" when I tried to build, so that case must be possible. I changed **@throws spec** to `ProviderException` and removed it from the throws line.
No, I didn't mean to remove it from line 650. What you proposed in the last sentence is what I meant.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19535#discussion_r1662867532
More information about the security-dev
mailing list