Refine contribution #4668
Before this commit, an assertion was enforcing
that when a skip limit is provided, then at least
one skippable exception is defined.
Since the default value of skip limit was changed
to 10 in fd45d322, that assertion is now replaced
with a log message at debug level.
Related to #4661
This commit is contained in:
@@ -555,8 +555,11 @@ public class FaultTolerantStepBuilder<I, O> extends SimpleStepBuilder<I, O> {
|
||||
map.put(ForceRollbackForWriteSkipException.class, true);
|
||||
LimitCheckingItemSkipPolicy limitCheckingItemSkipPolicy = new LimitCheckingItemSkipPolicy(skipLimit, map);
|
||||
if (skipPolicy == null) {
|
||||
Assert.state(!(skippableExceptionClasses.isEmpty() && skipLimit > 0),
|
||||
"If a skip limit is provided then skippable exceptions must also be specified");
|
||||
if (skippableExceptionClasses.isEmpty() && skipLimit > 0) {
|
||||
logger.debug(String.format(
|
||||
"A skip limit of %s is set but no skippable exceptions are defined. Consider defining skippable exceptions.",
|
||||
skipLimit));
|
||||
}
|
||||
skipPolicy = limitCheckingItemSkipPolicy;
|
||||
}
|
||||
else if (limitCheckingItemSkipPolicy != null) {
|
||||
|
||||
Reference in New Issue
Block a user