Closed
Description
I have this Kotlin code using Spring Boot 3/Spring Framework 6.2:
fun someRestCall(name: String?): Details {
return restClient.get().uri("/{name}/details", name).retrieve().body(Details::class.java)!!
}
Where uri
takes a String and a vararg of Object
.
Upgrading to Spring Framework 7, I am getting:
MyService.kt:35:49 Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.Any' was expected.
I upgraded to Kotlin 2.1 in a separate commit so it looks like the extra checks might come from Spring Framework 7.0 itself. The new behavior looks more correct to me but I am wondering why it isn't failing in 6.x.