RESOLVED - issue BATCH-547: confusing ItemWriterRetryCallback#doWithRetry
inlined the process(..) method body - it was trivial and used in one place only
This commit is contained in:
@@ -105,7 +105,9 @@ public class ItemWriterRetryCallback implements RetryCallback {
|
||||
public Object doWithRetry(RetryContext context) throws Throwable {
|
||||
// This requires a collaboration with the RetryPolicy...
|
||||
if (!context.isExhaustedOnly()) {
|
||||
process(context);
|
||||
if (item != null) {
|
||||
writer.write(item);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
throw new RetryException("Recovery path requested in retry callback.");
|
||||
@@ -115,13 +117,6 @@ public class ItemWriterRetryCallback implements RetryCallback {
|
||||
return item;
|
||||
}
|
||||
|
||||
private Object process(RetryContext context) throws Exception {
|
||||
if (item != null) {
|
||||
writer.write(item);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor for the {@link ItemRecoverer}. If the handler is null but the
|
||||
* {@link ItemWriter} is an instance of {@link ItemRecoverer}, then it will
|
||||
|
||||
Reference in New Issue
Block a user