Improve error message for platform types.

The error message about platform types will never contain qualifiers.
Also, simplify platform type check.
This commit is contained in:
Eric Cochran
2018-11-19 02:23:25 -08:00
parent 8b17ecedae
commit a920b9be3a
4 changed files with 18 additions and 36 deletions

View File

@@ -481,8 +481,8 @@ class KotlinJsonAdapterTest {
moshi.adapter(Triple::class.java)
fail()
} catch (e: IllegalArgumentException) {
assertThat(e).hasMessage("Platform class kotlin.Triple (with no annotations) "
+ "requires explicit JsonAdapter to be registered")
assertThat(e).hasMessage(
"Platform class kotlin.Triple requires explicit JsonAdapter to be registered")
}
}