mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Fix error message for invalid toJson signature. (#431)
void toJson(JsonWriter, JsonAdapter) does not make sense. This looks like my copy-paste error.
This commit is contained in:
committed by
Jesse Wilson
parent
5b194964a9
commit
d26b2a151f
@@ -191,9 +191,7 @@ 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(JsonWriter writer,"
|
||||
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
||||
+ " <any access modifier> void toJson(JsonWriter writer, T value"
|
||||
+ " <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");
|
||||
}
|
||||
|
@@ -304,9 +304,7 @@ 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(JsonWriter writer,"
|
||||
+ " JsonAdapter<any> delegate, <any more delegates>) throws <any>;\n"
|
||||
+ " <any access modifier> void toJson(JsonWriter writer, T value"
|
||||
+ " <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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user