Hi,

Please review this simple code cleanup.

The following checking for key in the makeSessionKey() method is redundant as 
it the same checking has been performance before calling the method.


        if (k == null) {
            throw new InvalidKeyException("Empty key");
        }
        if (!isKeySizeValid(k.length)) {
             throw new InvalidKeyException("Invalid AES key length: " +
                                           k.length + " bytes");
        }


No new regression test, simple cleanup.

Thanks,
Xuelei

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

Commit messages:
 - 8293779: redundant checking in AESCrypt.makeSessionKey() method

Changes: https://git.openjdk.org/jdk/pull/10263/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10263&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293779
  Stats: 7 lines in 1 file changed: 0 ins; 7 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/10263.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10263/head:pull/10263

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

Reply via email to