turcsanyip commented on a change in pull request #4721: URL: https://github.com/apache/nifi/pull/4721#discussion_r544536013
########## File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListFileTransfer.java ########## @@ -138,4 +144,32 @@ protected boolean isListingResetNecessary(final PropertyDescriptor property) { protected abstract FileTransfer getFileTransfer(final ProcessContext context); protected abstract String getProtocolName(); + + protected void validateAdjustedTimeWindow(ValidationContext validationContext, Collection<ValidationResult> results) { + if ( + BY_ADJUSTED_TIME_WINDOW.getValue().equals(validationContext.getProperty(FILE_TRANSFER_LISTING_STRATEGY).getValue()) + && + !validationContext.getProperty(TIME_ADJUSTMENT).isSet() + ) { + results.add(new ValidationResult.Builder() + .explanation("'" + TIME_ADJUSTMENT.getDisplayName() + "' has to be set when '" + + FILE_TRANSFER_LISTING_STRATEGY.getDisplayName() + "' is set to '" + BY_ADJUSTED_TIME_WINDOW.getValue() + "'") Review comment: `BY_ADJUSTED_TIME_WINDOW.getDisplayName()` should be used instead of `getValue()` Also in line 169. ---------------------------------------------------------------- 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: us...@infra.apache.org