RESOLVED - issue BATCH-1202: Improve error message when neither commit-interval nor chunk-completion-policy are specified on a chuck (xml namespace)
This commit is contained in:
@@ -99,9 +99,17 @@ public class ChunkElementParser {
|
||||
|
||||
if (!underspecified
|
||||
&& propertyValues.contains("commitInterval") == propertyValues.contains("chunkCompletionPolicy")) {
|
||||
parserContext.getReaderContext().error(
|
||||
"The <" + element.getNodeName() + "/> element must contain either '" + COMMIT_INTERVAL_ATTR + "' "
|
||||
+ "or '" + CHUNK_COMPLETION_POLICY_ATTR + "', but not both.", element);
|
||||
if (propertyValues.contains("commitInterval")) {
|
||||
parserContext.getReaderContext().error(
|
||||
"The <" + element.getNodeName() + "/> element must contain either '" + COMMIT_INTERVAL_ATTR
|
||||
+ "' " + "or '" + CHUNK_COMPLETION_POLICY_ATTR + "', but not both.", element);
|
||||
}
|
||||
else {
|
||||
parserContext.getReaderContext().error(
|
||||
"The <" + element.getNodeName() + "/> element must contain either '" + COMMIT_INTERVAL_ATTR
|
||||
+ "' " + "or '" + CHUNK_COMPLETION_POLICY_ATTR + "'.", element);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String skipLimit = element.getAttribute("skip-limit");
|
||||
|
||||
Reference in New Issue
Block a user