-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed as not planned
Labels
Description
Hi,
The following code snippets throw an incompatible issue when I try to upgrade Gson from 2.2.2 to 2.8.5.
public class TestGson {
public static <T> String convertObjectToString(T t, Class<T> clazz) {
Gson gson = new GsonBuilder().create();
try {
return gson.getAdapter(clazz).toJson(t);
} catch (IOException e) {
e.printStackTrace();
}
return "";
}
}
It works well before, but It throws an error after upgrading:
exception java.io.IOException is never thrown in body of corresponding try statement
Thanks a lot!