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

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

commit 47c293091d7e0377bd062fa2d67257834c60b8dd
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

Reply via email to