You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have a subclass of HashMap without a default constructor, Gson uses
LinkedHashMap as the object type. This isn't correct since we should have
instead tried to use UnsafeAllocator.
Original issue reported on code.google.com by inder123 on 11 Mar 2012 at 9:42
The text was updated successfully, but these errors were encountered:
Does it work if you register an InstanceCreator? I'm anxious about using
UnsafeAllocator on map and collection types. Types like HashMap expect their
constructors to run (and initialize state) but they won't necessarily get run
if we rely on UnsafeAllocator. (We'd be relying on the presence of a no-args
constructor).
Original comment by limpbizkit on 18 Mar 2012 at 6:01
Yes, it works if I register an InstanceCreator. My specific issue is resolved,
I added a no-args constructor. My concern is about keeping parity for this
feature. Either we support for all types, or we dont.
Original comment by inder123 on 18 Mar 2012 at 7:02
Original issue reported on code.google.com by
inder123
on 11 Mar 2012 at 9:42The text was updated successfully, but these errors were encountered: