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.

Reply via email to