mirror of https://github.com/apache/nifi.git
NIFI-10074 Fix potential UnsupportedOperationException in PutSmbFile.customValidate. (#6088)
This commit is contained in:
parent
45cc3cefe5
commit
0d45fef702
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue