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

PKCS12Attribute#hashCode is always constant -1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • None
    • security-libs
    • b09
    • Verified

      As found by errorprone, the lazy init code here:

          public int hashCode() {
              if (hashValue == -1) {
                  Arrays.hashCode(encoded);
              }
              return hashValue;
          }

      has no effect because the result of Arrays.hashCode is not assigned back to hashValue.

            weijun Weijun Wang
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: