| Reporter: |
|
Julien Buret |
| Created: |
|
Tue, 11 Sep 2007 14:02:35 -0700 (PDT) |
| Updated: |
|
Thu, 29 May 2008 23:24:13 -0700 (PDT) |
| Key: |
|
COLLECTIONS-266 |
| Versions: |
|
Not provided |
| Environment: |
|
|
| Priority: |
|
4 |
| Status: |
|
Closed |
| Resolution: |
|
Fixed |
| Original Link: |
|
http://issues.apache.org/jira/browse/COLLECTIONS-266 |
| Summary: |
|
Issue with MultiKey when serialized/deserialized via RMI |
Description:
This is because the hash code of MultiKey is calculated only once.
<p>So if the MultiKey is deserialized in an other jvm, and if one at least of the subkeys defines its hash code with System.identityHashCode() (for example all the enums does), then the hash code of the MultiKey is no longer valid, and you can't retreive the key in your Map.</p>
<p>I fixed it by making the cached hash code field transient, and by recalculating the hash code during deserialization. </p>
Comments:
| jburet |
Tue, 11 Sep 2007 14:04:39 -0700 (PDT) |
| bayard |
Wed, 12 Sep 2007 10:21:09 -0700 (PDT) |
| bayard |
Wed, 12 Sep 2007 10:24:02 -0700 (PDT) |
| bayard |
Wed, 12 Sep 2007 16:44:13 -0700 (PDT) |
| bayard |
Wed, 12 Sep 2007 16:44:57 -0700 (PDT) |
| jburet |
Thu, 13 Sep 2007 00:56:21 -0700 (PDT) |
| bayard |
Thu, 13 Sep 2007 16:15:35 -0700 (PDT) |
| joehni |
Thu, 13 Sep 2007 23:14:09 -0700 (PDT) |
| jburet |
Fri, 14 Sep 2007 00:20:45 -0700 (PDT) |
| joehni |
Fri, 14 Sep 2007 01:51:39 -0700 (PDT) |
| jburet |
Fri, 14 Sep 2007 02:49:36 -0700 (PDT) |
| joehni |
Fri, 14 Sep 2007 02:57:16 -0700 (PDT) |
| jburet |
Fri, 14 Sep 2007 03:12:51 -0700 (PDT) |
| scolebourne |
Mon, 17 Sep 2007 01:30:42 -0700 (PDT) |
| bayard |
Tue, 18 Sep 2007 11:56:00 -0700 (PDT) |
| joehni |
Wed, 19 Sep 2007 01:10:05 -0700 (PDT) |
| joehni |
Wed, 19 Sep 2007 01:21:51 -0700 (PDT) |
| bayard |
Tue, 13 May 2008 00:22:52 -0700 (PDT) |
| joehni |
Tue, 13 May 2008 04:01:54 -0700 (PDT) |
| bayard |
Thu, 29 May 2008 23:24:13 -0700 (PDT) |