river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter <j...@zeus.net.au>
Subject Immutable Entry
Date Tue, 11 Jun 2013 12:23:11 GMT
I've been thinking about how Entry objects are immutable in serialized form and of course how
they are not in unserialized form.

Should Entry fields be final by default?

The JMM makes an exception for Serialization, allowing final fields to be frozen after construction
during deserialization, provided it occurs before sharing with other threads. It would allow
Entry's to be shared safely among threads, as long as their public fields aren't mutable,
eg: an array.

Regards,

Peter.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message