woutifier-t commented on a change in pull request #3977: NIFI-7007 Add update
functionality to the PutCassandraRecord processor.
URL: https://github.com/apache/nifi/pull/3977#discussion_r375886439
##########
File path:
nifi-nar-bundles/nifi-cassandra-bundle/nifi-cassandra-processors/src/main/java/org/apache/nifi/processors/cassandra/PutCassandraRecord.java
##########
@@ -255,14 +257,9 @@ public void onTrigger(ProcessContext context,
ProcessSession session) throws Pro
throw new IllegalArgumentException(format("Statement Type is
not specified, FlowFile %s", inputFlowFile));
}
- // throw an exception if the statement type is set to update and
updateMethod or updateKeys is empty
- if (UPDATE_TYPE.getValue().equalsIgnoreCase(statementType)) {
- if (StringUtils.isEmpty(updateMethod)) {
- throw new IllegalArgumentException(format("Update Method
is not specified, FlowFile %s", inputFlowFile));
- }
- if (StringUtils.isEmpty(updateKeys)) {
+ // throw an exception if the statement type is set to update and
updateKeys is empty
+ if (UPDATE_TYPE.getValue().equalsIgnoreCase(statementType) &&
StringUtils.isEmpty(updateKeys)) {
Review comment:
I've added a test for this, but this is already checked on lines 355 to 367
(exception thrown on 366).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services