Closed GoogleCodeExporter closed 9 years ago
Find a quick patch for version 1.3 and for current source. But I did not already
understood everything (just 2h on the project).
Then for version 1.3:
Class: com.google.gson.JsonSerializationVisitor
Method: visitFieldUsingCustomHandler
Line 148 (may change)
Replace: JsonElement child = serializer.serialize(obj, actualTypeOfField,
context);
by: JsonElement child = serializer.serialize(obj, obj.getClass(), context);
For current version from svn:
Class: com.google.gson.JsonSerializationVisitor
Method: visitFieldUsingCustomHandler
Line 203
Replace: ObjectTypePair objTypePair = new ObjectTypePair(obj,
declaredTypeOfField,
false);
by: ObjectTypePair objTypePair = new ObjectTypePair(obj, obj.getClass(), false);
I ran Junit test before and after the modification.
I got 3 errors and 6 failures, but they are the same. So the modification may
not
have consequence.
Is the patch correct ?
Original comment by lapinouj...@gmail.com
on 14 May 2010 at 11:47
Original comment by limpbizkit
on 6 Oct 2010 at 6:35
Original issue reported on code.google.com by
lapinouj...@gmail.com
on 14 May 2010 at 10:35