findbugs fixes
This commit is contained in:
@@ -76,7 +76,7 @@ public class CustomItemReaderTests extends TestCase {
|
||||
assertEquals("2", itemReader.read());
|
||||
}
|
||||
|
||||
public class CustomItemReader<T> implements ItemReader<T>, ItemStream {
|
||||
public static class CustomItemReader<T> implements ItemReader<T>, ItemStream {
|
||||
|
||||
List<T> items;
|
||||
int currentIndex = 0;
|
||||
@@ -97,7 +97,7 @@ public class CustomItemReaderTests extends TestCase {
|
||||
|
||||
public void open(ExecutionContext executionContext) throws ItemStreamException {
|
||||
if(executionContext.containsKey(CURRENT_INDEX)){
|
||||
currentIndex = new Long(executionContext.getLong(CURRENT_INDEX)).intValue();
|
||||
currentIndex = executionContext.getInt(CURRENT_INDEX);
|
||||
}
|
||||
else{
|
||||
currentIndex = 0;
|
||||
@@ -107,7 +107,7 @@ public class CustomItemReaderTests extends TestCase {
|
||||
public void close(ExecutionContext executionContext) throws ItemStreamException {}
|
||||
|
||||
public void update(ExecutionContext executionContext) throws ItemStreamException {
|
||||
executionContext.putLong(CURRENT_INDEX, new Long(currentIndex).longValue());
|
||||
executionContext.putInt(CURRENT_INDEX, currentIndex);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class CustomItemWriterTests {
|
||||
assertEquals(3, itemWriter.getOutput().size());
|
||||
}
|
||||
|
||||
public class CustomItemWriter<T> implements ItemWriter<T> {
|
||||
public static class CustomItemWriter<T> implements ItemWriter<T> {
|
||||
|
||||
List<T> output = TransactionAwareProxyFactory.createTransactionalList();
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ public class AggregateItemReaderTests {
|
||||
Object result = provider.read();
|
||||
|
||||
// it should be collection of 3 strings "line"
|
||||
assertTrue(result instanceof Collection);
|
||||
Collection<?> lines = (Collection<?>) result;
|
||||
assertEquals(3, lines.size());
|
||||
|
||||
|
||||
@@ -106,8 +106,6 @@ public class OrderItemReaderTests {
|
||||
|
||||
// verify result
|
||||
assertNotNull(result);
|
||||
// result should be Order
|
||||
assertTrue(result instanceof Order);
|
||||
|
||||
// verify whether order is constructed correctly
|
||||
// Order object should contain same instances as returned by mapper
|
||||
|
||||
Reference in New Issue
Block a user