Skip to content

Improve RestOperations Kotlin extensions [SPR-16274] #20821

@spring-projects-issues

Description

@spring-projects-issues

Sébastien Deleuze opened SPR-16274 and commented

RestOperations Kotlin extensions should be improved on the following points.

1. Since type erasure can be fixed only when using ParameterizedTypeReference based Java methods, API documentation should be updated to avoid mentioning reified type parameters or getForObject() / getForEntity() should call internally exchange() with a ParameterizedTypeReference parameter.

Spring Boot TestRestTemplate extensions should be updated as well.

2. Nullability of parameters should be consistent with the Java API. It is currently not the case for requestEntity for example. Also potentially using null default parameters where that's possible could make sense.


Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions