RESOLVED - BATCH-963: ExecutionContext modifications in ItemStream.close(ExecutionContext) are not persisted
removed ExecutionContext argument from ItemStream.close() signature
This commit is contained in:
@@ -42,7 +42,7 @@ public class TestReader extends AbstractTestComponent implements ItemReader<Stri
|
||||
return null;
|
||||
}
|
||||
|
||||
public void close(ExecutionContext executionContext)
|
||||
public void close()
|
||||
throws ItemStreamException {
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ExampleItemReader implements ItemReader<String>, ItemStream {
|
||||
return input[index++];
|
||||
}
|
||||
|
||||
public void close(ExecutionContext executionContext) throws ItemStreamException {
|
||||
public void close() throws ItemStreamException {
|
||||
}
|
||||
|
||||
public void open(ExecutionContext executionContext) throws ItemStreamException {
|
||||
|
||||
@@ -159,7 +159,7 @@ public class TaskletStepExceptionTests {
|
||||
final RuntimeException exception = new RuntimeException();
|
||||
taskletStep.setStreams(new ItemStream[] { new ItemStreamSupport() {
|
||||
@Override
|
||||
public void close(ExecutionContext executionContext) throws ItemStreamException {
|
||||
public void close() throws ItemStreamException {
|
||||
throw exception;
|
||||
}
|
||||
} });
|
||||
|
||||
@@ -656,7 +656,7 @@ public class TaskletStepTests {
|
||||
|
||||
step.setJobRepository(new JobRepositorySupport());
|
||||
step.setStreams(new ItemStream[] { new ItemStreamSupport() {
|
||||
public void close(ExecutionContext executionContext) throws ItemStreamException {
|
||||
public void close() throws ItemStreamException {
|
||||
throw new RuntimeException("Bar");
|
||||
}
|
||||
} });
|
||||
@@ -679,8 +679,8 @@ public class TaskletStepTests {
|
||||
public void testStatusForCloseFailedException() throws Exception {
|
||||
|
||||
MockRestartableItemReader itemReader = new MockRestartableItemReader() {
|
||||
public void close(ExecutionContext executionContext) throws ItemStreamException {
|
||||
super.close(executionContext);
|
||||
public void close() throws ItemStreamException {
|
||||
super.close();
|
||||
// Simulate failure on rollback when stream resets
|
||||
throw new RuntimeException("Bar");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user