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
This actually looks like an improvement in Gson between 2.2.2 and 2.8.5: in Gson 2.8.5, TypeAdapter<T>#toJson(T value) is no longer declared as throwing IOException. This was implemented in 0328479 and released in Gson 2.4.
Ah thank you for the clarification, I thought the author of this issue meant the error message occurred during runtime, but it was actually a compiler error.
I guess adding back throws IOException now would not be very useful and would also again break source compatibility. Though the assumption that no IOException can occur is actually incorrect (#2172).
Also, let's better not look at the signature of TypeAdapter.fromJson(String) (fromJson(String) throws IOException) from a consistency perspective 🙈
Hi,
The following code snippets throw an incompatible issue when I try to upgrade Gson from 2.2.2 to 2.8.5.
It works well before, but It throws an error after upgrading:
Thanks a lot!
The text was updated successfully, but these errors were encountered: