[concurrency-interest] Joda-Time immutability
opinali at gmail.com
Mon Jun 20 09:03:43 EDT 2011
IIRC serialization relies on Unsafe magic directly so it doesn't depend on
the public reflection APIs
On Jun 20, 2011 7:49 AM, "Roel Spilker" <r.spilker at topdesk.com> wrote:
> IIRC, disallowing the setting of final fields by reflection was never
implemented, despite several bug reports, BECAUSE it is used
> On 20-6-2011 13:09, Mark Thornton wrote:
>> On 20/06/11 11:33, Stephen Colebourne wrote:
>>> c) Try to do something clever with serialization to read the fields in
>>> manually. No - can't then store the read data as the instance variable
>>> has to be final...
>> You can use reflection to write to final fields. This permitted under
>> the memory model subject to certain restrictions.
>> Mark Thornton
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest