Polish code with code cleanup rules

This commit is contained in:
Phillip Webb
2024-12-04 13:54:28 -08:00
parent 1edc997440
commit 9e7972a9b4
19 changed files with 72 additions and 54 deletions

View File

@@ -421,7 +421,7 @@ public class MockitoPostProcessor implements InstantiationAwareBeanPostProcessor
RootBeanDefinition definition = new RootBeanDefinition(postProcessor);
definition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
ConstructorArgumentValues constructorArguments = definition.getConstructorArgumentValues();
constructorArguments.addIndexedArgumentValue(0, new LinkedHashSet<MockDefinition>());
constructorArguments.addIndexedArgumentValue(0, new LinkedHashSet<>());
registry.registerBeanDefinition(BEAN_NAME, definition);
return definition;
}

View File

@@ -270,13 +270,13 @@ class TestRestTemplateTests {
@Test
void exchangeWithRequestEntityAndClassHandlesRelativeUris() throws IOException {
verifyRelativeUriHandling((testRestTemplate, relativeUri) -> testRestTemplate
.exchange(new RequestEntity<String>(HttpMethod.GET, relativeUri), String.class));
.exchange(new RequestEntity<>(HttpMethod.GET, relativeUri), String.class));
}
@Test
void exchangeWithRequestEntityAndParameterizedTypeReferenceHandlesRelativeUris() throws IOException {
verifyRelativeUriHandling((testRestTemplate, relativeUri) -> testRestTemplate
.exchange(new RequestEntity<String>(HttpMethod.GET, relativeUri), new ParameterizedTypeReference<String>() {
.exchange(new RequestEntity<>(HttpMethod.GET, relativeUri), new ParameterizedTypeReference<String>() {
}));
}