What steps will reproduce the problem?
Foo foo = ctx.deserialize(jsonElement, Bar.class);
JsonDeserializationContext have the method
<T> T deserialize(JsonElement json, Type typeOfT)
You may accidentally pass wrong typeOfT argument here and it'll explode at
runtime (Bar do not extend Foo).
Why not make it type safer and make compiler catch the problem:
<T> T deserialize(JsonElement json, TypeToken<T> typeOfT)
<T> T deserialize(JsonElement json, Class<T> typeOfT)
Original issue reported on code.google.com by Ash2kk@gmail.com on 30 May 2012 at 10:08
Original issue reported on code.google.com by
Ash2kk@gmail.com
on 30 May 2012 at 10:08