Closed GoogleCodeExporter closed 9 years ago
It's definitely an inconsistency in GSON.
Gson.fromJson(JsonElement, Class) calls Class.cast() but fromJson(String,
Class) does not.
It suggests there are two bugs:
1. fromJson(String, Class) should call Class.cast() before returning its result
2. In both methods we should canonicalize int.class to Integer.class, and
similarly for the other primitive types.
Original comment by limpbizkit
on 31 Oct 2010 at 2:52
Fixed in r623.
Original comment by limpbizkit
on 1 Nov 2010 at 10:38
Original issue reported on code.google.com by
adi...@gmail.com
on 13 Sep 2010 at 6:53