Fix compiler warnings and polish
Fix various compiler warnings and apply a little polish.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user