Deal with compiler warnings

This commit is contained in:
Dave Syer
2010-11-22 14:44:37 +00:00
parent 28eb5b02d3
commit 3dd0c7f776
26 changed files with 74 additions and 99 deletions

View File

@@ -10,7 +10,6 @@ import org.springframework.orm.ibatis.SqlMapClientFactoryBean;
import com.ibatis.sqlmap.client.SqlMapClient;
@SuppressWarnings("unchecked")
@RunWith(JUnit4ClassRunner.class)
public class IbatisPagingItemReaderCommonTests extends AbstractDatabaseItemStreamItemReaderTests {
@@ -21,7 +20,7 @@ public class IbatisPagingItemReaderCommonTests extends AbstractDatabaseItemStrea
factory.afterPropertiesSet();
SqlMapClient sqlMapClient = createSqlMapClient();
IbatisPagingItemReader reader = new IbatisPagingItemReader();
IbatisPagingItemReader<Foo> reader = new IbatisPagingItemReader<Foo>();
reader.setQueryId("getPagedFoos");
reader.setPageSize(2);
reader.setSqlMapClient(sqlMapClient);
@@ -41,7 +40,7 @@ public class IbatisPagingItemReaderCommonTests extends AbstractDatabaseItemStrea
}
protected void pointToEmptyInput(ItemReader<Foo> tested) throws Exception {
IbatisPagingItemReader reader = (IbatisPagingItemReader) tested;
IbatisPagingItemReader<Foo> reader = (IbatisPagingItemReader<Foo>) tested;
reader.close();
reader.setQueryId("getNoFoos");

View File

@@ -11,7 +11,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.ibatis.sqlmap.client.SqlMapClient;
@SuppressWarnings("unchecked")
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "/org/springframework/batch/item/database/data-source-context.xml")
public class IbatisPagingItemReaderParameterTests extends AbstractPagingItemReaderParameterTests {
@@ -23,7 +22,7 @@ public class IbatisPagingItemReaderParameterTests extends AbstractPagingItemRead
factory.afterPropertiesSet();
SqlMapClient sqlMapClient = createSqlMapClient();
IbatisPagingItemReader reader = new IbatisPagingItemReader();
IbatisPagingItemReader<Foo> reader = new IbatisPagingItemReader<Foo>();
reader.setQueryId("getPagedFoos3AndUp");
reader.setParameterValues(Collections.<String, Object>singletonMap("limit", 3));
reader.setSqlMapClient(sqlMapClient);

View File

@@ -51,7 +51,7 @@ public class MultiResourceItemReaderXmlTests extends AbstractItemStreamItemReade
return foo;
}
@SuppressWarnings("unchecked")
@SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}

View File

@@ -59,7 +59,7 @@ public class MultiResourceItemWriterXmlTests extends AbstractMultiResourceItemWr
}
}
@SuppressWarnings("unchecked")
@SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}

View File

@@ -111,7 +111,7 @@ public class SpringValidatorTests {
public static final TestBean REJECT_MULTI_VALUE = new TestBean("foo", "bar");
@SuppressWarnings("unchecked")
@SuppressWarnings({ "rawtypes", "unchecked" })
public boolean supports(Class clazz) {
return clazz.isAssignableFrom(TestBean.class);
}

View File

@@ -49,7 +49,7 @@ public class StaxEventItemReaderCommonTests extends AbstractItemStreamItemReader
return foo;
}
@SuppressWarnings("unchecked")
@SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}

View File

@@ -374,7 +374,7 @@ public class StaxEventItemReaderTests {
return events;
}
@SuppressWarnings("unchecked")
@SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}

View File

@@ -418,7 +418,7 @@ public class StaxEventItemWriterTests {
}
}
@SuppressWarnings("unchecked")
@SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}

View File

@@ -226,7 +226,7 @@ public class TransactionalStaxEventItemWriterTests {
}
}
@SuppressWarnings("unchecked")
@SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}