Fix compiler warnings and polish

Fix various compiler warnings and apply a little polish.
This commit is contained in:
Phillip Webb
2019-04-24 14:33:18 -07:00
parent 4754386361
commit 1e44aba772
61 changed files with 212 additions and 125 deletions

View File

@@ -29,6 +29,8 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for {@link TestRestTemplateContextCustomizer} to ensure
* early-initialization of factory beans doesn't occur.
@@ -47,6 +49,7 @@ public class TestRestTemplateContextCustomizerWithFactoryBeanTests {
@Test
public void test() {
assertThat(this.restTemplate).isNotNull();
}
@Configuration

View File

@@ -21,9 +21,13 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
/**
* A simple factory bean with no generics. Used to test early initialization doesn't
* occur.
*
* @author Madhura Bhave
*/
@Component
@SuppressWarnings("rawtypes")
public class SimpleFactoryBean implements FactoryBean {
private static boolean isInitializedEarly = false;
@@ -40,10 +44,12 @@ public class SimpleFactoryBean implements FactoryBean {
}
}
@Override
public Object getObject() {
return new Object();
}
@Override
public Class<?> getObjectType() {
return Object.class;
}