Update Gson.java documentation to explicitly state behavior for empty strings (#1464)
This commit is contained in:
parent
da5cae371e
commit
4d942db168
@ -832,7 +832,8 @@ public final class Gson {
|
|||||||
* <pre>
|
* <pre>
|
||||||
* Type typeOfT = new TypeToken<Collection<Foo>>(){}.getType();
|
* Type typeOfT = new TypeToken<Collection<Foo>>(){}.getType();
|
||||||
* </pre>
|
* </pre>
|
||||||
* @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 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
|
* @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
|
* @param json the root of the parse tree of {@link JsonElement}s from which the object is to
|
||||||
* be deserialized
|
* be deserialized
|
||||||
* @param classOfT The class of T
|
* @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
|
* @throws JsonSyntaxException if json is not a valid representation for an object of type typeOfT
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
@ -988,7 +990,8 @@ public final class Gson {
|
|||||||
* <pre>
|
* <pre>
|
||||||
* Type typeOfT = new TypeToken<Collection<Foo>>(){}.getType();
|
* Type typeOfT = new TypeToken<Collection<Foo>>(){}.getType();
|
||||||
* </pre>
|
* </pre>
|
||||||
* @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
|
* @throws JsonSyntaxException if json is not a valid representation for an object of type typeOfT
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user