Fix unnecessary @SupressWarnings annotations

This commit is contained in:
Phillip Webb
2013-01-29 15:37:25 -08:00
parent 2b0d860923
commit d89e30b864
20 changed files with 3 additions and 25 deletions

View File

@@ -133,7 +133,6 @@ public class AnnotationConfigApplicationContextTests {
}
}
@SuppressWarnings("unchecked")
@Test
public void getBeanByTypeAmbiguityRaisesException() {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TwoTestBeanConfig.class);

View File

@@ -47,7 +47,7 @@ public class BeanMethodPolymorphismTests {
@Test
public void beanMethodOverloadingWithoutInheritance() {
@SuppressWarnings({ "unused", "hiding" })
@SuppressWarnings({ "hiding" })
@Configuration class Config {
@Bean String aString() { return "na"; }
@Bean String aString(Integer dependency) { return "na"; }

View File

@@ -41,7 +41,6 @@ import org.springframework.context.annotation.DependsOn;
*
* @author Chris Beams
*/
@SuppressWarnings("unused") // for unused @Bean methods in local classes
public class BeanAnnotationAttributePropagationTests {
@Test

View File

@@ -130,7 +130,6 @@ public class FormattingConversionServiceFactoryBeanTests {
private static class TestBean {
@SuppressWarnings("unused")
@NumberFormat(style = Style.PERCENT)
private double percent;

View File

@@ -393,7 +393,6 @@ public class FormattingConversionServiceTests {
private static class ModelWithSubclassField {
@SuppressWarnings("unused")
@org.springframework.format.annotation.DateTimeFormat(style = "S-")
public MyDate date;
}

View File

@@ -20,7 +20,6 @@ import org.junit.Ignore;
// converting away from old-style EasyMock APIs was problematic with this class
// glassfish dependencies no longer on classpath
@SuppressWarnings("deprecation")
@Ignore
public class GlassFishLoadTimeWeaverTests {

View File

@@ -74,7 +74,6 @@ public class EnableAsyncTests {
}
@SuppressWarnings("unchecked")
@Test
public void withAsyncBeanWithExecutorQualifiedByName() throws ExecutionException, InterruptedException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();