markobean commented on code in PR #9620:
URL: https://github.com/apache/nifi/pull/9620#discussion_r1911264405
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GenerateFlowFile.java:
##########
@@ -187,11 +188,13 @@ protected Collection<ValidationResult>
customValidate(ValidationContext validati
+ "text and Unique FlowFiles must be false.").build());
}
+ results.add(StandardValidators.DATA_SIZE_VALIDATOR.validate("File
Size",
validationContext.getProperty(FILE_SIZE).evaluateAttributeExpressions().getValue(),
validationContext));
Review Comment:
Removed.
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GenerateFlowFile.java:
##########
@@ -76,7 +76,8 @@ public class GenerateFlowFile extends AbstractProcessor {
.description("The size of the file that will be used")
.required(true)
.defaultValue("0B")
- .addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
+ .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
Review Comment:
Thanks for pointing this out. I missed the fact that `DATA_SIZE_VALIDATOR`
supports EL. The error I saw was only when no validator was provided at all.
I reverted back to `DATA_SIZE_VALIDATOR` and tested in a running NiFi. All
good.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]