From ddcd6aea7d2069b13afd142646f6c92b8af63acb Mon Sep 17 00:00:00 2001 From: Nels Beckman Date: Mon, 18 Sep 2017 01:08:22 -0600 Subject: [PATCH] Update fromJson Javadoc. (#1151) For the string-based fromJson() method, mention that the result will be null if the given string is empty. --- gson/src/main/java/com/google/gson/Gson.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gson/src/main/java/com/google/gson/Gson.java b/gson/src/main/java/com/google/gson/Gson.java index 28285738..fc8ba2ee 100644 --- a/gson/src/main/java/com/google/gson/Gson.java +++ b/gson/src/main/java/com/google/gson/Gson.java @@ -765,7 +765,8 @@ public final class Gson { * @param the type of the desired object * @param json the string from which the object is to be deserialized * @param classOfT the class of T - * @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 JsonSyntaxException if json is not a valid representation for an object of type * classOfT */