diff --git a/gson/src/main/java/com/google/gson/Gson.java b/gson/src/main/java/com/google/gson/Gson.java index c2d7b618c1..c4a4a7bb4e 100644 --- a/gson/src/main/java/com/google/gson/Gson.java +++ b/gson/src/main/java/com/google/gson/Gson.java @@ -1098,12 +1098,11 @@ public JsonReader newJsonReader(Reader reader) { * @param classOfT the class of T * @return an object of type T from the string. Returns {@code null} if {@code json} is {@code * null} or if {@code json} is empty. - * @throws JsonSyntaxException if json is not a valid representation for an object of type - * classOfT + * @throws JsonParseException if json is not a valid representation for an object of type classOfT * @see #fromJson(Reader, Class) * @see #fromJson(String, TypeToken) */ - public T fromJson(String json, Class classOfT) throws JsonSyntaxException { + public T fromJson(String json, Class classOfT) throws JsonParseException { return fromJson(json, TypeToken.get(classOfT)); }