harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Regis <xu.re...@gmail.com>
Subject Re: [jira] Created: (HARMONY-6661) Synchonrize on mutable field in Permissions.java
Date Wed, 29 Sep 2010 08:15:03 GMT
On 2010-09-29 15:04, Alexey Varlamov wrote:
> You are correct, synchronization in readObject is superfluous.
> Serialization is different indeed, yet readObject is irrelevant.
>
> --
> WBR,
> Alexey
>
>>
>> In this case, readObject play a role like constructor, initialize the
>> object, so I guess it could be safe here without "synchornized" block. But
>> serialization may be different, is there any chance that someone could hold
>> a reference to a incompletely deserialized object and then invoke methods on
>> it?
>>
>> --
>> Best Regards,
>> Regis.
>>
>

Thanks for the explanation in JIRA, Alexey, I just removed "synchronized" block 
in Permissions.readObject() at r1002506.

-- 
Best Regards,
Regis.

Mime
View raw message