in jbatch/src/main/java/org/apache/batchee/container/impl/controller/chunk/SkipHandler.java [44:72]
public SkipHandler(final Chunk chunk) {
try {
if (chunk.getSkipLimit() != null) {
_skipLimit = Integer.parseInt(chunk.getSkipLimit());
if (_skipLimit < 0) {
throw new IllegalArgumentException("The skip-limit attribute on a chunk cannot be a negative value");
}
}
} catch (final NumberFormatException nfe) {
throw new RuntimeException("NumberFormatException reading skip-limit", nfe);
}
// Read the include/exclude exceptions.
if (chunk.getSkippableExceptionClasses() != null && chunk.getSkippableExceptionClasses().getIncludeList() != null) {
final List<ExceptionClassFilter.Include> includes = chunk.getSkippableExceptionClasses().getIncludeList();
for (final ExceptionClassFilter.Include include : includes) {
config.getIncludes().add(include.getClazz().trim());
}
}
if (chunk.getSkippableExceptionClasses() != null && chunk.getSkippableExceptionClasses().getExcludeList() != null) {
final List<ExceptionClassFilter.Exclude> excludes = chunk.getSkippableExceptionClasses().getExcludeList();
for (final ExceptionClassFilter.Exclude exclude : excludes) {
config.getExcludes().add(exclude.getClazz().trim());
}
}
}