Freedom9339 commented on code in PR #8362: URL: https://github.com/apache/nifi/pull/8362#discussion_r1628042697
########## 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: @mattyb149 Thank you for the review. A ValidationResult is created and returned once the thrown exception is catched. I could replace the throw exception with a ValidationResult, but it would be a duplicate of what the catch block already does. https://github.com/apache/nifi/blob/9edb476aea715666a1e63d47996c911596e8eadb/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateCsv.java#L262-L270 -- 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