On Tue, 18 May 2021 21:58:24 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   cleanup
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java 
> line 149:
> 
>> 147:             if (spec == null) {
>> 148:                 throw new InvalidKeyException("No GCMParameterSpec 
>> specified");
>> 149:             }
> 
> This seems redundant as it's already been checked in engineInit() before 
> calling this method. Line 154 directly calls spec.getTLen() without checking 
> spec != null.

That does appear to be unnecessary. engineInit() make sure there is a spec 
exists.

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

PR: https://git.openjdk.java.net/jdk/pull/4072

Reply via email to