ConcurrentHashMap serialization fix

Doug Lea dl at
Thu Apr 25 09:17:14 PDT 2013

On 04/25/13 10:47, Peter Levart wrote:
> Hello,
> The fix adds back "extends
> ReentrantLock" to CHM.Segment to fix the serialization format of new CHM.

Thanks! I don't know how that went away.

> The fix gets rid of CHM.segments field and uses serialPersistentFields
> array to simulate the field and changes the writeObject to use local
> instance of segments array for populating the stream.

Even better. I'm always hesitant about creating serial fields,
but should have done it this way to begin with.

I committed (with some trivial changes) to our jsr166 version,
so we can include when sync'ing up with main tl branch.


More information about the lambda-dev mailing list