Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8293779

redundant checking in AESCrypt.makeSessionKey() method

XMLWordPrintable

      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");
              }

            xuelei Xuelei Fan
            xuelei Xuelei Fan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: