You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Boot 2.4.2, both overloads of TestRestTemplate#exchange that accept RequestEntity call getUrl on it. When the RequestEntity has been initialized with a URI template instead of a java.net.URI, this triggers an UnsupportedOperationException.
wilkinsona
changed the title
TestRestTemplate exchange triggers UnsupportedOperationException in RequestEntity
TestRestTemplate exchange triggers UnsupportedOperationException when using a UriTemplateRequestEntity
Feb 4, 2021
In Boot 2.4.2, both overloads of
TestRestTemplate#exchange
that acceptRequestEntity
callgetUrl
on it. When theRequestEntity
has been initialized with a URI template instead of ajava.net.URI
, this triggers anUnsupportedOperationException
.Internally, the real
RestTemplate
dispatches based on the concrete type ofRequestEntity
, butTestRestTemplate
fails to check.see spring-projects/spring-framework#26500
The text was updated successfully, but these errors were encountered: