Re: RFR: 8000955: Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()

2012-10-17 Thread Neil Richards
Now pushed to jdk8/tl/jdk [1]. Regards, Neil [1] http://hg.openjdk.java.net/jdk8/tl/jdk/rev/5eed4a92ca8c On Wed, 2012-10-17 at 12:09 +0100, Alan Bateman wrote: > On 17/10/2012 00:12, Neil Richards wrote: > > Okay, you convinced me. :) > > > > Here's another webrev [1], updated to make use of Obj

Re: RFR: 8000955: Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()

2012-10-17 Thread Alan Bateman
On 17/10/2012 00:12, Neil Richards wrote: Okay, you convinced me. :) Here's another webrev [1], updated to make use of Objects.hashCode() in the fix (as well as in the testcase). Can I now interest a Reviewer in endorsing this fix ? Thanks, Neil [1] http://cr.openjdk.java.net/~ngmr/8000955/we

RFR: 8000955: Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()

2012-10-16 Thread Neil Richards
Okay, you convinced me. :) Here's another webrev [1], updated to make use of Objects.hashCode() in the fix (as well as in the testcase). Can I now interest a Reviewer in endorsing this fix ? Thanks, Neil [1] http://cr.openjdk.java.net/~ngmr/8000955/webrev.03/ On Tue, 2012-10-16 at 09:13 -0700,

Re: Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()

2012-10-16 Thread Mike Duigou
On Oct 15 2012, at 20:53 , Neil Richards wrote: > Hi Mike, > Thanks for the swift appraisal. > > Good suggestion to expand the test to cover other Map implementations - > I'd toyed with the idea, but hadn't spotted Collisions.java as a > template to follow. > > I've posted an new webrev [2] wit

Re: Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()

2012-10-16 Thread Ulf Zibis
Am 16.10.2012 05:53, schrieb Neil Richards: I've posted an new webrev [2] with the updated (and moved) testcase, which also makes use of Objects.hashCode() . I suspect, that it's productive to use the same algorithm in test and testée. =-O -Ulf

Re: Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()

2012-10-15 Thread Neil Richards
Hi Mike, Thanks for the swift appraisal. Good suggestion to expand the test to cover other Map implementations - I'd toyed with the idea, but hadn't spotted Collisions.java as a template to follow. I've posted an new webrev [2] with the updated (and moved) testcase, which also makes use of Object

Re: Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()

2012-10-15 Thread Mike Duigou
Good find Neil. I have opened JDK-8000955 for this issue along with JDK-8000956 for the Java 7 backport. The code could be simplified by using Objects.hashCode() ie. return Objects.hashCode(key) ^ Objects.hashCode(value); Any objection to extending the test similar to Collisions.java to test

Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()

2012-10-15 Thread Neil Richards
Hi, I notice that the behaviour of java.util.Hashtable.Entry.hashCode() no longer conforms to the defined behaviour (in the Java API Javadoc [1]) for java.util.Map.Entry.hashCode() implementations. The code in Hashtable.Entry.hashCode() assumes that the value in Hashtable.Entry.hash will always be