Closed GoogleCodeExporter closed 9 years ago
There is a race condition that occurs around this that will cause gson to fail
to put JSON data into Java classes when the ObjectTypePair is out of sync.
Original comment by rojo...@gmail.com
on 3 Nov 2010 at 10:37
I'm having trouble finding the place where an ObjectTypePair instance is
visible to multiple threads. Can you tell me what public API you're using to
get ObjectTypePair.setObject() to be called?
Original comment by limpbizkit
on 4 Nov 2010 at 10:33
I don't have a deep understanding of the code, and the change does seem to be a
side effect - but in ObjectNavigator.java in the accept method there is a call
to objTypePair.setObject(objectToVisit);
The original type was an object, not the type of the objectToVisit.
This lack of type causes the deserialisation to fail.
The root cause seems to be earlier in the system, but once gson gets into the
state where this mismatch happens it continues to be in the bad state.
In our system we have forked gson in order to ensure that it works correctly.
Original comment by rojo...@gmail.com
on 9 Nov 2010 at 3:07
Despite significant effort, I can't reproduce this in the current GSON tree.
I'm guessing this has already been fixed.
Original comment by limpbizkit
on 24 Jan 2011 at 10:36
Original issue reported on code.google.com by
rojo...@gmail.com
on 3 Nov 2010 at 10:35