OPEN - BATCH-803: Add non-buffering ChunkOrientedTasklet (or option in existing one) plus flag for factory bean
remove unused skipCount property from ItemWrapper
This commit is contained in:
@@ -12,39 +12,17 @@ public class ItemWrapper<T> {
|
||||
|
||||
final private T item;
|
||||
|
||||
final private int skipCount;
|
||||
|
||||
/**
|
||||
* @param item
|
||||
*/
|
||||
public ItemWrapper(T item) {
|
||||
this(item, null, 0);
|
||||
this(item, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param item
|
||||
* @param skipCount
|
||||
*/
|
||||
public ItemWrapper(T item, int skipCount) {
|
||||
this(item, null, skipCount);
|
||||
}
|
||||
|
||||
public ItemWrapper(T item, Exception e) {
|
||||
this(item, e, 0);
|
||||
}
|
||||
|
||||
public ItemWrapper(T item, Exception e, int skipCount) {
|
||||
this.item = item;
|
||||
this.exception = e;
|
||||
this.skipCount = skipCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Public getter for the skipCount.
|
||||
* @return the skipCount
|
||||
*/
|
||||
public int getSkipCount() {
|
||||
return skipCount;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,7 +43,7 @@ public class ItemWrapper<T> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("[exception=%s, item=%s, skips=%d]", exception, item, skipCount);
|
||||
return String.format("[exception=%s, item=%s]", exception, item);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,18 +35,6 @@ public class ItemWrapperTests {
|
||||
ItemWrapper<String> wrapper = new ItemWrapper<String>("foo");
|
||||
assertEquals("foo", wrapper.getItem());
|
||||
assertEquals(null, wrapper.getException());
|
||||
assertEquals(0, wrapper.getSkipCount());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link org.springframework.batch.core.step.item.ItemWrapper#ItemWrapper(java.lang.Object, int)}.
|
||||
*/
|
||||
@Test
|
||||
public void testItemWrapperTInt() {
|
||||
ItemWrapper<String> wrapper = new ItemWrapper<String>("foo",2);
|
||||
assertEquals("foo", wrapper.getItem());
|
||||
assertEquals(null, wrapper.getException());
|
||||
assertEquals(2, wrapper.getSkipCount());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,18 +45,6 @@ public class ItemWrapperTests {
|
||||
ItemWrapper<String> wrapper = new ItemWrapper<String>("foo",exception);
|
||||
assertEquals("foo", wrapper.getItem());
|
||||
assertEquals(exception, wrapper.getException());
|
||||
assertEquals(0, wrapper.getSkipCount());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link org.springframework.batch.core.step.item.ItemWrapper#ItemWrapper(java.lang.Object, java.lang.Exception, int)}.
|
||||
*/
|
||||
@Test
|
||||
public void testItemWrapperTExceptionInt() {
|
||||
ItemWrapper<String> wrapper = new ItemWrapper<String>("foo", exception, 2);
|
||||
assertEquals("foo", wrapper.getItem());
|
||||
assertEquals(exception , wrapper.getException());
|
||||
assertEquals(2, wrapper.getSkipCount());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user