moshi: IllegalArgumentException: wrong number of arguments

In generated code

@JsonClass(generateAdapter = true)
data class Dashboard(
        val tabTitle1: String? = null,
)

becomes

    @Suppress("UNCHECKED_CAST")
    val localConstructor: Constructor<Dashboard> = this.constructorRef
        ?: Util.lookupDefaultsConstructor(Dashboard::class.java).also { this.constructorRef = it }
    return localConstructor.newInstance(
        tabTitle1,
        mask,
        null
    )
  }

in the latest snapshot, resulting in “java.lang.IllegalArgumentException: wrong number of arguments” for localConstructor.newInstance

why “mask” and “null” are added?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (2 by maintainers)

Most upvoted comments

wowow. Mind opening a separate issue to track that? That seems distinctly different from this one, and a limitation we’ll need to figure out