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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user