diff --git a/gson/src/main/java/com/google/gson/Gson.java b/gson/src/main/java/com/google/gson/Gson.java index 0c455b2a..ba677e26 100644 --- a/gson/src/main/java/com/google/gson/Gson.java +++ b/gson/src/main/java/com/google/gson/Gson.java @@ -832,7 +832,8 @@ public final class Gson { *
* Type typeOfT = new TypeToken<Collection<Foo>>(){}.getType(); *- * @return an object of type T from the string. Returns {@code null} if {@code json} is {@code null}. + * @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 JsonParseException if json is not a valid representation for an object of type typeOfT * @throws JsonSyntaxException if json is not a valid representation for an object of type */ @@ -965,7 +966,8 @@ public final class Gson { * @param json the root of the parse tree of {@link JsonElement}s from which the object is to * be deserialized * @param classOfT The class of T - * @return an object of type T from the json. Returns {@code null} if {@code json} is {@code null}. + * @return an object of type T from the json. 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 typeOfT * @since 1.3 */ @@ -988,7 +990,8 @@ public final class Gson { *
* Type typeOfT = new TypeToken<Collection<Foo>>(){}.getType(); *- * @return an object of type T from the json. Returns {@code null} if {@code json} is {@code null}. + * @return an object of type T from the json. 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 typeOfT * @since 1.3 */