[BATCH-430] Renamed InfrastructureException to UnexpectedJobExecutionException
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.batch.sample.item.writer;
|
||||
|
||||
import org.springframework.batch.core.InfrastructureException;
|
||||
import org.springframework.batch.core.UnexpectedJobExecutionException;
|
||||
import org.springframework.batch.item.writer.DelegatingItemWriter;
|
||||
import org.springframework.batch.sample.domain.Order;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.batch.sample.domain.Order;
|
||||
public class OrderWriter extends DelegatingItemWriter {
|
||||
public Object doProcess(Object data) {
|
||||
if (!(data instanceof Order)) {
|
||||
throw new InfrastructureException("OrderProcessor can process only Order objects");
|
||||
throw new UnexpectedJobExecutionException("OrderProcessor can process only Order objects");
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.batch.sample.tasklet;
|
||||
|
||||
|
||||
import org.springframework.batch.core.InfrastructureException;
|
||||
import org.springframework.batch.core.UnexpectedJobExecutionException;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.reader.DelegatingItemReader;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ExceptionThrowingItemReaderProxy extends DelegatingItemReader {
|
||||
|
||||
counter++;
|
||||
if (counter == throwExceptionOnRecordNumber) {
|
||||
throw new InfrastructureException("Planned failure on count="+counter);
|
||||
throw new UnexpectedJobExecutionException("Planned failure on count="+counter);
|
||||
}
|
||||
|
||||
return super.read();
|
||||
|
||||
Reference in New Issue
Block a user