IN PROGRESS - BATCH-907: Integer support in ExecutionContext

simplifying ItemStreams to take advantage of EC int support
This commit is contained in:
robokaso
2008-11-10 13:29:38 +00:00
parent f31670c866
commit 7958089737
3 changed files with 8 additions and 8 deletions

View File

@@ -89,7 +89,7 @@ public abstract class AbstractItemCountingItemStreamItemReader<T> implements Ite
}
if (executionContext.containsKey(ecSupport.getKey(READ_COUNT))) {
int itemCount = new Long(executionContext.getLong(ecSupport.getKey(READ_COUNT))).intValue();
int itemCount = executionContext.getInt(ecSupport.getKey(READ_COUNT));
try {
jumpToItem(itemCount);
@@ -106,7 +106,7 @@ public abstract class AbstractItemCountingItemStreamItemReader<T> implements Ite
public void update(ExecutionContext executionContext) throws ItemStreamException {
if (saveState) {
Assert.notNull(executionContext, "ExecutionContext must not be null");
executionContext.putLong(ecSupport.getKey(READ_COUNT), currentItemCount);
executionContext.putInt(ecSupport.getKey(READ_COUNT), currentItemCount);
}
}