NIFI-10074 Fix potential UnsupportedOperationException in PutSmbFile.customValidate. (#6088)

This commit is contained in:
tpalfy 2022-06-01 20:27:07 +02:00 committed by GitHub
parent 45cc3cefe5
commit 0d45fef702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ public class PutSmbFile extends AbstractProcessor {
@Override
protected Collection<ValidationResult> customValidate(ValidationContext validationContext) {
Collection<ValidationResult> set = Collections.emptySet();
Collection<ValidationResult> set = new ArrayList<>();
if (validationContext.getProperty(USERNAME).isSet() && !validationContext.getProperty(PASSWORD).isSet()) {
set.add(new ValidationResult.Builder().explanation("Password must be set if username is supplied.").build());
}