mirror of
https://github.com/fankes/moshi.git
synced 2025-10-20 00:19:21 +08:00
Fix @ToJson IAE message. (#275)
This commit is contained in:
committed by
Jesse Wilson
parent
718f832864
commit
11dbc3c50b
@@ -186,7 +186,9 @@ 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,"
|
+ " <any access modifier> void toJson(JsonWriter writer,"
|
||||||
|
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
||||||
|
+ " <any access modifier> void toJson(JsonWriter writer, T value"
|
||||||
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
+ " 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");
|
||||||
}
|
}
|
||||||
|
@@ -264,7 +264,9 @@ 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,"
|
+ " <any access modifier> void toJson(JsonWriter writer,"
|
||||||
|
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
||||||
|
+ " <any access modifier> void toJson(JsonWriter writer, T value"
|
||||||
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
+ " 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");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user