mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Convert util package to Kotlin (#1461)
* Rename .java to .kt * Convert NonNullJsonAdapter * Rename .java to .kt * Convert NullSafeJsonAdapter * Fix missing null-check * Rename .java to .kt * Convert Util (initial pass) * Push to top-level Util * Use extensions and properties where possible * Use knownNotNull * Spotless * Clean up impl type classes a bit * Update code gen * Use extension for resolving * Spotless * Fix master conflicts * Rename to toStringWithAnnotations() * for (t in args.indices) { * for (i in interfaces.indices) { * Template
This commit is contained in:
@@ -1270,7 +1270,7 @@ class GeneratedAdaptersTest {
|
||||
@Test fun customGenerator_withClassPresent() {
|
||||
val moshi = Moshi.Builder().build()
|
||||
val adapter = moshi.adapter<CustomGeneratedClass>()
|
||||
val unwrapped = (adapter as NullSafeJsonAdapter<CustomGeneratedClass>).delegate()
|
||||
val unwrapped = (adapter as NullSafeJsonAdapter<CustomGeneratedClass>).delegate
|
||||
assertThat(unwrapped).isInstanceOf(
|
||||
GeneratedAdaptersTest_CustomGeneratedClassJsonAdapter::class.java
|
||||
)
|
||||
|
Reference in New Issue
Block a user