PKCS12Attribute#hashCode is always constant -1

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 11
    • Affects Version/s: None
    • Component/s: 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.

            Assignee:
            Weijun Wang
            Reporter:
            Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: