[concurrency-interest] Joda-Time immutability

Osvaldo Doederlein 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
indeserialization.
>
>
> 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
>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20110620/cd353661/attachment.html>


More information about the Concurrency-interest mailing list