From a034e73fca462ddcf91b26aaa097e3468cf25d55 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Mon, 8 Aug 2022 01:37:10 +0200 Subject: [PATCH] Add throws javadoc tag for TypeAdapter methods --- gson/src/main/java/com/google/gson/TypeAdapter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gson/src/main/java/com/google/gson/TypeAdapter.java b/gson/src/main/java/com/google/gson/TypeAdapter.java index 72a3b1a21d..c8adfee83d 100644 --- a/gson/src/main/java/com/google/gson/TypeAdapter.java +++ b/gson/src/main/java/com/google/gson/TypeAdapter.java @@ -131,7 +131,7 @@ public abstract class TypeAdapter { * Unlike Gson's similar {@link Gson#toJson(JsonElement, Appendable) toJson} * method, this write is strict. Create a {@link * JsonWriter#setLenient(boolean) lenient} {@code JsonWriter} and call - * {@link #write(com.google.gson.stream.JsonWriter, Object)} for lenient + * {@link #write(JsonWriter, Object)} for lenient * writing. * * @param value the Java object to convert. May be null. @@ -205,9 +205,9 @@ public final TypeAdapter nullSafe() { * Converts {@code value} to a JSON document. Unlike Gson's similar {@link * Gson#toJson(Object) toJson} method, this write is strict. Create a {@link * JsonWriter#setLenient(boolean) lenient} {@code JsonWriter} and call - * {@link #write(com.google.gson.stream.JsonWriter, Object)} for lenient - * writing. + * {@link #write(JsonWriter, Object)} for lenient writing. * + * @throws JsonIOException wrapping {@code IOException}s thrown by {@link #write(JsonWriter, Object)} * @param value the Java object to convert. May be null. * @since 2.2 */ @@ -226,6 +226,7 @@ public final String toJson(T value) { * * @param value the Java object to convert. May be null. * @return the converted JSON tree. May be {@link JsonNull}. + * @throws JsonIOException wrapping {@code IOException}s thrown by {@link #write(JsonWriter, Object)} * @since 2.2 */ public final JsonElement toJsonTree(T value) { @@ -248,7 +249,7 @@ public final JsonElement toJsonTree(T value) { /** * Converts the JSON document in {@code in} to a Java object. Unlike Gson's - * similar {@link Gson#fromJson(java.io.Reader, Class) fromJson} method, this + * similar {@link Gson#fromJson(Reader, Class) fromJson} method, this * read is strict. Create a {@link JsonReader#setLenient(boolean) lenient} * {@code JsonReader} and call {@link #read(JsonReader)} for lenient reading. * @@ -284,6 +285,7 @@ public final T fromJson(String json) throws IOException { * * @param jsonTree the JSON element to convert. May be {@link JsonNull}. * @return the converted Java object. May be null. + * @throws JsonIOException wrapping {@code IOException}s thrown by {@link #read(JsonReader)} * @since 2.2 */ public final T fromJsonTree(JsonElement jsonTree) {