Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-26 Thread Mike Duigou
52535001... 10002 OK 5000 2.50204720472001... 4002 OK Regards, Peter On 2015-01-05 07:48, core-libs-dev-requ...@openjdk.java.net wrote: Today's Topics: 2. Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes tablewith wrong capacity

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-21 Thread Martin Buchholz
52535001... 10002 OK 5000 2.50204720472001... 4002 OK Regards, Peter On 2015-01-05 07:48, core-libs-dev-requ...@openjdk.java.net wrote: Today's Topics: 2. Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes tablewith wrong capacity (Daniel

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-21 Thread Peter Levart
wrote: Today's Topics: 2. Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes tablewith wrong capacity (Daniel Fuchs) Message: 2 Date: Mon, 05 Jan 2015 15:52:55 +0100

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-21 Thread Peter Levart
...@openjdk.java.net wrote: Today's Topics: 2. Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes tablewith wrong capacity (Daniel Fuchs) Message: 2 Date: Mon, 05 Jan 2015 15:52:55 +0100 From: Daniel Fuchs daniel.fu...@oracle.com To: Peter Levart peter.lev...@gmail.com, core-libs-dev

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-21 Thread Chris Hegarty
On 2015-01-05 07:48, core-libs-dev-requ...@openjdk.java.net wrote: Today's Topics: 2. Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes tablewith wrong capacity (Daniel Fuchs) Message: 2 Date: Mon, 05 Jan 2015 15:52:55 +0100 From: Daniel Fuchs daniel.fu

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-09 Thread Peter Levart
...@openjdk.java.net wrote: Today's Topics: 2. Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes tablewith wrong capacity (Daniel Fuchs) Message: 2 Date: Mon, 05 Jan 2015 15:52:55 +0100 From: Daniel Fuchs daniel.fu...@oracle.com To: Peter Levart peter.lev...@gmail.com, core-libs-dev

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-05 Thread Chris Hegarty
This looks fine to me Peter. Thanks. -Chris. On 04/01/15 17:58, Peter Levart wrote: Hi, While investigating the following issue: https://bugs.openjdk.java.net/browse/JDK-8029891 I noticed there's a bug in deserialization code of java.util.Hashtable (from day one probably):

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-05 Thread Daniel Fuchs
On 04/01/15 18:58, Peter Levart wrote: Hi, While investigating the following issue: https://bugs.openjdk.java.net/browse/JDK-8029891 I noticed there's a bug in deserialization code of java.util.Hashtable (from day one probably): https://bugs.openjdk.java.net/browse/JDK-8068427 The

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-05 Thread Mike Duigou
deserialized values are in valid ranges. Mike On 2015-01-05 07:48, core-libs-dev-requ...@openjdk.java.net wrote: Today's Topics: 2. Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity (Daniel Fuchs) Message: 2 Date: Mon, 05 Jan 2015 15:52:55 +0100

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-05 Thread Peter Levart
On 01/05/2015 03:52 PM, Daniel Fuchs wrote: On 04/01/15 18:58, Peter Levart wrote: Hi, While investigating the following issue: https://bugs.openjdk.java.net/browse/JDK-8029891 I noticed there's a bug in deserialization code of java.util.Hashtable (from day one probably):

RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-04 Thread Peter Levart
Hi, While investigating the following issue: https://bugs.openjdk.java.net/browse/JDK-8029891 I noticed there's a bug in deserialization code of java.util.Hashtable (from day one probably): https://bugs.openjdk.java.net/browse/JDK-8068427 The fix is a trivial one-character

Re: RFR: JDK-8068427 Hashtable deserialization reconstitutes table with wrong capacity

2015-01-04 Thread Martin Buchholz
Looks good. Not surprising no one ever noticed, since the code is intentionally trying to reduce the number of buckets. I would encapsulate serialization mechanics in a separate serialClone method, as done elsewhere e.g. @SuppressWarnings(unchecked) private static T T serialClone(T o)