Use instanceof patterns
See gh-33987
This commit is contained in:
committed by
Phillip Webb
parent
a9c547e767
commit
0e68cae57f
@@ -962,8 +962,7 @@ public class TestRestTemplate {
|
||||
}
|
||||
|
||||
private URI resolveUri(RequestEntity<?> entity) {
|
||||
if (entity instanceof UriTemplateRequestEntity) {
|
||||
UriTemplateRequestEntity<?> templatedUriEntity = (UriTemplateRequestEntity<?>) entity;
|
||||
if (entity instanceof UriTemplateRequestEntity<?> templatedUriEntity) {
|
||||
if (templatedUriEntity.getVars() != null) {
|
||||
return this.restTemplate.getUriTemplateHandler().expand(templatedUriEntity.getUriTemplate(),
|
||||
templatedUriEntity.getVars());
|
||||
|
||||
Reference in New Issue
Block a user