Fix remaining compiler warnings

Fix remaining Java compiler warnings, mainly around missing
generics or deprecated code.

Also add the `-Werror` compiler option to ensure that any future
warnings will fail the build.

Issue: SPR-11064
This commit is contained in:
Phillip Webb
2013-11-21 18:15:09 -08:00
parent 4de3291dc7
commit 59002f2456
540 changed files with 1943 additions and 1843 deletions

View File

@@ -252,9 +252,10 @@ public final class ServiceLocatorFactoryBeanTests {
}
@Test(expected=IllegalArgumentException.class)
@SuppressWarnings("unchecked")
public void testWhenServiceLocatorExceptionClassIsNotAnExceptionSubclass() throws Exception {
ServiceLocatorFactoryBean factory = new ServiceLocatorFactoryBean();
factory.setServiceLocatorExceptionClass(getClass());
factory.setServiceLocatorExceptionClass((Class) getClass());
// should throw, bad (non-Exception-type) serviceLocatorException class supplied
}

View File

@@ -38,8 +38,9 @@ public final class CustomCollectionEditorTests {
}
@Test(expected=IllegalArgumentException.class)
@SuppressWarnings("unchecked")
public void testCtorWithNonCollectionType() throws Exception {
new CustomCollectionEditor(String.class);
new CustomCollectionEditor((Class) String.class);
}
@Test(expected=IllegalArgumentException.class)