Clean up warnings
This commit is contained in:
@@ -95,7 +95,7 @@ public class MethodLocatingFactoryBeanTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void testSunnyDayPath() throws Exception {
|
||||
given(beanFactory.getType(BEAN_NAME)).willReturn((Class)String.class);
|
||||
factory.setTargetBeanName(BEAN_NAME);
|
||||
@@ -110,7 +110,7 @@ public class MethodLocatingFactoryBeanTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void testWhereMethodCannotBeResolved() {
|
||||
given(beanFactory.getType(BEAN_NAME)).willReturn((Class)String.class);
|
||||
factory.setTargetBeanName(BEAN_NAME);
|
||||
|
||||
@@ -1356,6 +1356,7 @@ public class ConfigurationClassPostProcessorTests {
|
||||
@Configuration
|
||||
public static class RawFactoryMethodRepositoryConfiguration {
|
||||
|
||||
@SuppressWarnings("rawtypes") // intentionally a raw type
|
||||
@Bean
|
||||
public Repository stringRepo() {
|
||||
return new Repository<String>() {
|
||||
|
||||
@@ -305,6 +305,7 @@ public class PropertySourceAnnotationTests {
|
||||
|
||||
@Inject Environment env;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Bean
|
||||
public FactoryBean testBean() {
|
||||
final String name = env.getProperty("testbean.name");
|
||||
|
||||
@@ -578,6 +578,7 @@ public class ApplicationContextEventTests extends AbstractApplicationEventListen
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static class MyPayloadListener implements ApplicationListener<PayloadApplicationEvent> {
|
||||
|
||||
public final Set<Object> seenPayloads = new HashSet<>();
|
||||
|
||||
@@ -34,6 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
public class PayloadApplicationEventTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings({ "rawtypes", "resource" })
|
||||
public void testEventClassWithInterface() {
|
||||
ApplicationContext ac = new AnnotationConfigApplicationContext(AuditableListener.class);
|
||||
AuditablePayloadEvent event = new AuditablePayloadEvent<>(this, "xyz");
|
||||
|
||||
Reference in New Issue
Block a user