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

Collections.SingletonList::hashCode not spec-compliant

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • core-libs

      JDK-8037325 implemented SingletonList as

      return Objects.hashCode(element);

      but it needs to be

      return 31 + Objects.hashCode(element);

      to be compliant with specification.

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: