mirror of
https://github.com/fankes/moshi.git
synced 2025-10-20 00:19:21 +08:00
Update adapter methods ISE message. (#273)
This commit is contained in:
committed by
Jesse Wilson
parent
05b0a46961
commit
1b634bbb74
@@ -186,6 +186,8 @@ final class AdapterMethodsFactory implements JsonAdapter.Factory {
|
|||||||
throw new IllegalArgumentException("Unexpected signature for " + method + ".\n"
|
throw new IllegalArgumentException("Unexpected signature for " + method + ".\n"
|
||||||
+ "@ToJson method signatures may have one of the following structures:\n"
|
+ "@ToJson method signatures may have one of the following structures:\n"
|
||||||
+ " <any access modifier> void toJson(JsonWriter writer, T value) throws <any>;\n"
|
+ " <any access modifier> void toJson(JsonWriter writer, T value) throws <any>;\n"
|
||||||
|
+ " <any access modifier> void toJson(JsonReader jsonReader,"
|
||||||
|
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
||||||
+ " <any access modifier> R toJson(T value) throws <any>;\n");
|
+ " <any access modifier> R toJson(T value) throws <any>;\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,7 +250,9 @@ final class AdapterMethodsFactory implements JsonAdapter.Factory {
|
|||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Unexpected signature for " + method + ".\n"
|
throw new IllegalArgumentException("Unexpected signature for " + method + ".\n"
|
||||||
+ "@FromJson method signatures may have one of the following structures:\n"
|
+ "@FromJson method signatures may have one of the following structures:\n"
|
||||||
+ " <any access modifier> void fromJson(JsonReader jsonReader) throws <any>;\n"
|
+ " <any access modifier> R fromJson(JsonReader jsonReader) throws <any>;\n"
|
||||||
|
+ " <any access modifier> R fromJson(JsonReader jsonReader,"
|
||||||
|
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
||||||
+ " <any access modifier> R fromJson(T value) throws <any>;\n");
|
+ " <any access modifier> R fromJson(T value) throws <any>;\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -215,6 +215,8 @@ public final class AdapterMethodsTest {
|
|||||||
+ "(com.squareup.moshi.AdapterMethodsTest$Point).\n"
|
+ "(com.squareup.moshi.AdapterMethodsTest$Point).\n"
|
||||||
+ "@ToJson method signatures may have one of the following structures:\n"
|
+ "@ToJson method signatures may have one of the following structures:\n"
|
||||||
+ " <any access modifier> void toJson(JsonWriter writer, T value) throws <any>;\n"
|
+ " <any access modifier> void toJson(JsonWriter writer, T value) throws <any>;\n"
|
||||||
|
+ " <any access modifier> void toJson(JsonReader jsonReader,"
|
||||||
|
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
||||||
+ " <any access modifier> R toJson(T value) throws <any>;\n");
|
+ " <any access modifier> R toJson(T value) throws <any>;\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -234,7 +236,9 @@ public final class AdapterMethodsTest {
|
|||||||
+ "com.squareup.moshi.AdapterMethodsTest$UnexpectedSignatureFromJsonAdapter.pointFromJson"
|
+ "com.squareup.moshi.AdapterMethodsTest$UnexpectedSignatureFromJsonAdapter.pointFromJson"
|
||||||
+ "(java.lang.String).\n"
|
+ "(java.lang.String).\n"
|
||||||
+ "@FromJson method signatures may have one of the following structures:\n"
|
+ "@FromJson method signatures may have one of the following structures:\n"
|
||||||
+ " <any access modifier> void fromJson(JsonReader jsonReader) throws <any>;\n"
|
+ " <any access modifier> R fromJson(JsonReader jsonReader) throws <any>;\n"
|
||||||
|
+ " <any access modifier> R fromJson(JsonReader jsonReader,"
|
||||||
|
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
||||||
+ " <any access modifier> R fromJson(T value) throws <any>;\n");
|
+ " <any access modifier> R fromJson(T value) throws <any>;\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user