-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: taskA general taskA general task
Milestone
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.
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: taskA general taskA general task