Collections.SingletonList::hashCode not spec-compliant

XMLWordPrintable

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

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

              Created:
              Updated:
              Resolved: