RFR: 8294734: Redundant override in AES implementation

Valerie Peng valeriep at openjdk.org
Tue Oct 4 17:10:35 UTC 2022


On Mon, 3 Oct 2022 19:18:20 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

> Hi,
> 
> May I have this simple code clean-up patch reviewed?
> 
> In the AES cipher implementation, the override of engineDoFinal() method in the following code is not necessary as it only calls super.  The throws descriptions are missed in the method description.  I may be better to remove this override implementation, rather than fix the method description.
> 
> 
>     /**
>      * Finalize crypto operation with ByteBuffers
>      *
>      * @param input the input ByteBuffer
>      * @param output the output ByteBuffer
>      *
>      * @return output length
>      * @throws ShortBufferException
>      * @throws IllegalBlockSizeException
>      * @throws BadPaddingException
>      */
>     protected int engineDoFinal(ByteBuffer input, ByteBuffer output)
>         throws ShortBufferException, IllegalBlockSizeException,
>         BadPaddingException {
>         return super.engineDoFinal(input, output);
>     }
> 
> ``` 
> 
> Code clean-up, not new regression test added.
> 
> Thanks,
> Xuelei

Thanks for the clean up.

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

Marked as reviewed by valeriep (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10545



More information about the security-dev mailing list