8172720: Collections.SingletonList::hashCode not spec-compliant
authorredestad
Thu, 12 Jan 2017 17:07:49 +0100
changeset 43069 6653ea6dad6e
parent 43068 df01087b2c43
child 43070 2c327aa46246
8172720: Collections.SingletonList::hashCode not spec-compliant Reviewed-by: chegar
jdk/src/java.base/share/classes/java/util/Collections.java
--- a/jdk/src/java.base/share/classes/java/util/Collections.java	Thu Jan 12 13:38:27 2017 +0100
+++ b/jdk/src/java.base/share/classes/java/util/Collections.java	Thu Jan 12 17:07:49 2017 +0100
@@ -4859,7 +4859,7 @@
         }
         @Override
         public int hashCode() {
-            return Objects.hashCode(element);
+            return 31 + Objects.hashCode(element);
         }
     }