Fix [deprecation] compiler warnings

Fix deprecation compiler warnings by refactoring code or applying
@SuppressWarnings("deprecation") annotations. JUnit tests of
internally deprecated classes are now themselves marked as
@Deprecated.

Numerous EasyMock deprecation warnings will remain until the
migration to mockito can be completed.
This commit is contained in:
Phillip Webb
2013-01-01 13:42:15 -08:00
parent 9364043a64
commit 6626a38730
153 changed files with 1665 additions and 1188 deletions
@@ -15,28 +15,30 @@
*/
package com.foo;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import java.util.List;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
/**
* @author Costin Leau
*/
public class ComponentBeanDefinitionParserTest {
private static XmlBeanFactory bf;
private static DefaultListableBeanFactory bf;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
bf = new XmlBeanFactory(new ClassPathResource(
"com/foo/component-config.xml"));
bf = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(
new ClassPathResource("com/foo/component-config.xml"));
}
@AfterClass
@@ -71,4 +73,4 @@ public class ComponentBeanDefinitionParserTest {
assertThat("Karate-1", equalTo(components.get(0).getName()));
assertThat("Sport-1", equalTo(components.get(1).getName()));
}
}
}