Remove unnecessary toString() calls
See gh-38739
This commit is contained in:
committed by
Phillip Webb
parent
b6e87cee35
commit
8599e5a986
@@ -153,7 +153,7 @@ class AssertProviderApplicationContextInvocationHandler implements InvocationHan
|
||||
|
||||
private ApplicationContext getStartedApplicationContext() {
|
||||
if (this.startupFailure != null) {
|
||||
throw new IllegalStateException(toString() + " failed to start", this.startupFailure);
|
||||
throw new IllegalStateException(this + " failed to start", this.startupFailure);
|
||||
}
|
||||
return this.applicationContext;
|
||||
}
|
||||
|
||||
@@ -956,7 +956,7 @@ public class TestRestTemplate {
|
||||
private URI applyRootUriIfNecessary(URI uri) {
|
||||
UriTemplateHandler uriTemplateHandler = this.restTemplate.getUriTemplateHandler();
|
||||
if ((uriTemplateHandler instanceof RootUriTemplateHandler rootHandler) && uri.toString().startsWith("/")) {
|
||||
return URI.create(rootHandler.getRootUri() + uri.toString());
|
||||
return URI.create(rootHandler.getRootUri() + uri);
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user