Don't do Kotlin reflection on a non-Kotlin class.

Closes: https://github.com/square/moshi/issues/662
This commit is contained in:
Jesse Wilson 2018-09-11 21:49:11 -04:00
parent 9f2ed487b2
commit c04f1bafde

View file

@ -869,7 +869,8 @@ class GeneratedAdaptersTest {
val encoded = MultiplePropertiesShareAdapter("Android", "Banana")
assertThat(jsonAdapter.toJson(encoded)).isEqualTo("""{"a":"ANDROID","b":"BANANA"}""")
val delegateAdapters = jsonAdapter::class.memberProperties.filter {
val delegateAdapters = GeneratedAdaptersTest_MultiplePropertiesShareAdapterJsonAdapter::class
.memberProperties.filter {
it.returnType.classifier == JsonAdapter::class
}
assertThat(delegateAdapters).hasSize(1)