Fix @ToJson IAE message. (#275)

This commit is contained in:
Eric Cochran
2017-03-28 02:57:53 -07:00
committed by Jesse Wilson
parent 718f832864
commit 11dbc3c50b
2 changed files with 6 additions and 2 deletions

View File

@@ -186,7 +186,9 @@ final class AdapterMethodsFactory implements JsonAdapter.Factory {
throw new IllegalArgumentException("Unexpected signature for " + method + ".\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(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"
+ " <any access modifier> R toJson(T value) throws <any>;\n");
}

View File

@@ -264,7 +264,9 @@ public final class AdapterMethodsTest {
+ "(com.squareup.moshi.AdapterMethodsTest$Point).\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(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"
+ " <any access modifier> R toJson(T value) throws <any>;\n");
}