Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gson/src/main/java/com/google/gson/Gson.java
Original file line number Diff line number Diff line change
Expand Up @@ -1098,12 +1098,12 @@
* @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
* @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> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException {
public <T> T fromJson(String json, Class<T> classOfT) throws JsonParseException {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method Gson.fromJson(..) could be confused with overloaded method
fromJson
, since dispatch depends on static types.
return fromJson(json, TypeToken.get(classOfT));
}

Expand Down
Loading