This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new bc75c24c82ad Replace deprecated method in mina-sftp
bc75c24c82ad is described below
commit bc75c24c82adeea00f01125a35cbdce2d3f93c81
Author: Aurélien Pupier <[email protected]>
AuthorDate: Thu Mar 5 10:25:17 2026 +0100
Replace deprecated method in mina-sftp
the charset is now required. Took the opportunity to switch to
java.nio.Files API instead of org.apache.commons.io.FileUtils to use
more JDK built-in functionality
Signed-off-by: Aurélien Pupier <[email protected]>
---
.../component/file/remote/mina/sftp/SftpFromSedaDeleteFileIT.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpFromSedaDeleteFileIT.java
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpFromSedaDeleteFileIT.java
index 9922bf9c75cc..305a6bba7916 100644
---
a/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpFromSedaDeleteFileIT.java
+++
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpFromSedaDeleteFileIT.java
@@ -18,11 +18,12 @@ package org.apache.camel.component.file.remote.mina.sftp;
import java.io.File;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
import java.util.concurrent.TimeUnit;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -64,7 +65,7 @@ public class SftpFromSedaDeleteFileIT extends
SftpServerTestSupport {
private void createSampleFile() throws IOException {
File file = new File(service.getFtpRootDir() + "/" + "foo.txt");
- FileUtils.write(file, "Hello World this file will be deleted");
+ Files.writeString(file.toPath(), "Hello World this file will be
deleted", StandardCharsets.UTF_8);
}
@Override