Tara Czutno
05/03/2023, 9:10 PMprivate fun buildClient(ten: String?) = BaseApiUrlBuilder(baseUrl, ten).build()
.let(defaultWebClientBuilder::baseUrl)
.build()
and BaseApiUrlBuilder looked like this
class BaseApiUrlBuilder(
private val url: String,
private val ten: String? = null,
) {
then BaseApiUrlBuilder was changed to:
class BaseApiUrlBuilder(
private val url: String,
private val ten: String? = null,
private val localPort: Long = 8080
) {
And we did not get a compiler error but later got a runtime error on the first block of code.
How can runtime errors like this be prevented? By using named arguments and having Detekt enforce named arguments? Other insights? Thanks.ephemient
05/03/2023, 9:16 PMJoffrey
05/05/2023, 8:47 AMNoSuchMethodError
?