You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/02/17 15:10:27 UTC

(camel) branch camel-4.10.x updated: CAMEL-21752: camel-smb - Update SMBClient instantiation to consider `SmbConfiguration` and its `SmbConfig`. This ensures proper initialization with custom configurations when available, improving flexibility and reducing potential issues with null values. (#17178)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.10.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.10.x by this push:
     new b625adf63b6 CAMEL-21752: camel-smb - Update SMBClient instantiation to consider `SmbConfiguration` and its `SmbConfig`. This ensures proper initialization with custom configurations when available, improving flexibility and reducing potential issues with null values. (#17178)
b625adf63b6 is described below

commit b625adf63b6b314d58d7b847f33f4e4bc441ccd8
Author: gtkow <gt...@users.noreply.github.com>
AuthorDate: Mon Feb 17 16:10:22 2025 +0100

    CAMEL-21752: camel-smb - Update SMBClient instantiation to consider `SmbConfiguration` and its `SmbConfig`. This ensures proper initialization with custom configurations when available, improving flexibility and reducing potential issues with null values. (#17178)
---
 .../src/main/java/org/apache/camel/component/smb/SmbOperations.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java b/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java
index 238cd71ef9b..20642747e5d 100644
--- a/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java
+++ b/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java
@@ -66,7 +66,7 @@ public class SmbOperations implements SmbFileOperations {
 
     public SmbOperations(SmbConfiguration configuration) {
         this.configuration = configuration;
-        this.smbClient = new SMBClient();
+        this.smbClient = configuration == null || configuration.getSmbConfig() == null ? new SMBClient() : new SMBClient(configuration.getSmbConfig());
     }
 
     @Override