mattyb149 commented on code in PR #8362:
URL: https://github.com/apache/nifi/pull/8362#discussion_r1617825158


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateCsv.java:
##########
@@ -240,7 +254,11 @@ protected Collection<ValidationResult> 
customValidate(ValidationContext context)
         }
         // If no Expression Language is present, try parsing the schema
         try {
-            this.parseSchema(schema);
+            if (schema != null) {
+                this.parseSchema(schema);
+            } else if (!headerProp.asBoolean()) {
+                throw(new Exception("Schema cannot be empty if header is 
false."));

Review Comment:
   Rather than throwing an exception, a ValidationResult should be added to a 
list to be returned at the end of the method.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to