From 0d45fef7027758339b05d77b742a6bbdb398d6be Mon Sep 17 00:00:00 2001 From: tpalfy <53442425+tpalfy@users.noreply.github.com> Date: Wed, 1 Jun 2022 20:27:07 +0200 Subject: [PATCH] NIFI-10074 Fix potential UnsupportedOperationException in PutSmbFile.customValidate. (#6088) --- .../main/java/org/apache/nifi/processors/smb/PutSmbFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java b/nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java index 2accbbf499..6c6821fca4 100644 --- a/nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java +++ b/nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/PutSmbFile.java @@ -229,7 +229,7 @@ public class PutSmbFile extends AbstractProcessor { @Override protected Collection customValidate(ValidationContext validationContext) { - Collection set = Collections.emptySet(); + Collection 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()); }