RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider [v4]
Mark Powers
mpowers at openjdk.org
Mon Jul 1 16:48:23 UTC 2024
On Mon, 24 Jun 2024 18:12:47 GMT, Sean Mullan <mullan at openjdk.org> wrote:
>> Mark Powers has updated the pull request incrementally with one additional commit since the last revision:
>>
>> move variables to above try block
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19535#discussion_r1661309987
More information about the security-dev
mailing list