cleaned up warnings in infrastructure tests
This commit is contained in:
@@ -12,6 +12,7 @@ import org.springframework.batch.item.sample.Foo;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class DrivingQueryItemReaderTests extends TestCase {
|
||||
|
||||
DrivingQueryItemReader<Foo> itemReader;
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.springframework.batch.item.sample.Foo;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
class FooItemReader implements ItemStream, ItemReader<Foo>, DisposableBean, InitializingBean {
|
||||
|
||||
DrivingQueryItemReader<?> itemReader;
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.junit.internal.runners.JUnit4ClassRunner;
|
||||
|
||||
import com.ibatis.sqlmap.client.SqlMapClient;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "deprecation"})
|
||||
@RunWith(JUnit4ClassRunner.class)
|
||||
public class IbatisItemReaderCommonTests extends CommonDatabaseItemStreamItemReaderTests {
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package org.springframework.batch.item.database;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.batch.item.sample.Foo;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.database.support.HsqlPagingQueryProvider;
|
||||
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.database.support.HsqlPagingQueryProvider;
|
||||
import org.springframework.batch.item.sample.Foo;
|
||||
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = "/org/springframework/batch/item/database/JdbcPagingItemReaderParameterTests-context.xml")
|
||||
public class JdbcPagingItemReaderClassicParameterTests extends AbstractPagingItemReaderParameterTests {
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package org.springframework.batch.item.database;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.batch.item.sample.Foo;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.database.support.HsqlPagingQueryProvider;
|
||||
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.database.support.HsqlPagingQueryProvider;
|
||||
import org.springframework.batch.item.sample.Foo;
|
||||
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = "/org/springframework/batch/item/database/JdbcPagingItemReaderParameterTests-context.xml")
|
||||
public class JdbcPagingItemReaderNamedParameterTests extends AbstractPagingItemReaderParameterTests {
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import java.util.Collections;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
public class JpaPagingItemReaderParameterTests extends AbstractPagingItemReaderParameterTests {
|
||||
|
||||
@@ -17,12 +17,12 @@ package org.springframework.batch.item.database;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.database.support.MultipleColumnJdbcKeyCollector;
|
||||
import org.springframework.batch.item.sample.Foo;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* @author Lucas Ward
|
||||
@@ -30,6 +30,7 @@ import org.junit.runner.RunWith;
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = "data-source-context.xml")
|
||||
@SuppressWarnings("deprecation")
|
||||
public class MultipleColumnJdbcDrivingQueryItemReaderIntegrationTests extends
|
||||
AbstractJdbcItemReaderIntegrationTests {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.junit.runner.RunWith;
|
||||
import org.junit.internal.runners.JUnit4ClassRunner;
|
||||
|
||||
@RunWith(JUnit4ClassRunner.class)
|
||||
@SuppressWarnings("deprecation")
|
||||
public class SingleColumnJdbcDrivingQueryItemReaderCommonTests extends CommonDatabaseItemStreamItemReaderTests {
|
||||
|
||||
protected ItemReader<Foo> getItemReader() throws Exception {
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = "data-source-context.xml")
|
||||
@SuppressWarnings("deprecation")
|
||||
public class SingleColumnJdbcDrivingQueryItemReaderIntegrationTests extends AbstractJdbcItemReaderIntegrationTests {
|
||||
|
||||
protected ItemReader<Long> source;
|
||||
|
||||
@@ -28,6 +28,7 @@ import javax.sql.DataSource;
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = "/org/springframework/batch/item/database/data-source-context.xml")
|
||||
@SuppressWarnings("deprecation")
|
||||
public class MultipleColumnJdbcKeyGeneratorIntegrationTests {
|
||||
|
||||
MultipleColumnJdbcKeyCollector<Map<?,?>> keyStrategy;
|
||||
|
||||
@@ -24,6 +24,7 @@ import javax.sql.DataSource;
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = "/org/springframework/batch/item/database/data-source-context.xml")
|
||||
@SuppressWarnings("deprecation")
|
||||
public class SingleColumnJdbcKeyGeneratorIntegrationTests {
|
||||
|
||||
SingleColumnJdbcKeyCollector<Long> keyStrategy;
|
||||
|
||||
@@ -34,7 +34,6 @@ public class TransactionAwareListItemReaderTests extends TestCase {
|
||||
|
||||
private ListItemReader<String> reader;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
reader = new ListItemReader<String>(TransactionAwareProxyFactory.createTransactionalList(Arrays.asList("a", "b", "c")));
|
||||
|
||||
Reference in New Issue
Block a user