Merge branch '3.1.x'

Closes gh-38877
This commit is contained in:
Phillip Webb
2023-12-19 22:51:48 -08:00
45 changed files with 69 additions and 71 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -169,7 +169,7 @@ abstract class AbstractJsonMarshalTesterTests {
assertThat(tester.parse(MAP_JSON)).asMap().containsEntry("a", OBJECT);
}
protected static final ExampleObject createExampleObject(String name, int age) {
protected static ExampleObject createExampleObject(String name, int age) {
ExampleObject exampleObject = new ExampleObject();
exampleObject.setName(name);
exampleObject.setAge(age);