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


The following commit(s) were added to refs/heads/main by this push:
     new 6b387fb57be6 [CAMEL-22848] camel-file: checksumFileAlgorithm option is 
ignored due to missing mapping in GenericFileEndpoint (#20798)
6b387fb57be6 is described below

commit 6b387fb57be6368e8b2ebfaa35d9ec15dee7225f
Author: Luigi De Masi <[email protected]>
AuthorDate: Tue Jan 13 15:25:19 2026 +0100

    [CAMEL-22848] camel-file: checksumFileAlgorithm option is ignored due to 
missing mapping in GenericFileEndpoint (#20798)
---
 .../camel/component/file/GenericFileEndpoint.java  |  3 ++
 .../component/file/FileEndpointParamsTest.java     | 47 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git 
a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
 
b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
index 691064e33cd8..a83c03a59b41 100644
--- 
a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
+++ 
b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
@@ -1745,6 +1745,9 @@ public abstract class GenericFileEndpoint<T> extends 
ScheduledPollEndpoint imple
         if (readLockIdempotentReleaseExecutorService != null) {
             params.put("readLockIdempotentReleaseExecutorService", 
readLockIdempotentReleaseExecutorService);
         }
+        if (checksumFileAlgorithm != null) {
+            params.put("checksumFileAlgorithm", checksumFileAlgorithm);
+        }
         return params;
     }
 
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/component/file/FileEndpointParamsTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/component/file/FileEndpointParamsTest.java
new file mode 100644
index 000000000000..93b7531f82cc
--- /dev/null
+++ 
b/core/camel-core/src/test/java/org/apache/camel/component/file/FileEndpointParamsTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.file;
+
+import java.util.Map;
+
+import org.apache.camel.Component;
+import org.apache.camel.ContextTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class FileEndpointParamsTest extends ContextTestSupport {
+
+    @Test
+    public void testChecksumFileAlgorithmParams() throws Exception {
+        MyFileEndpoint myEndpoint = new MyFileEndpoint("file:target/foo", 
context.getComponent("file"));
+        myEndpoint.setChecksumFileAlgorithm("MD5");
+
+        Map<String, Object> params = myEndpoint.getParams();
+        assertEquals("MD5", params.get("checksumFileAlgorithm"), 
"checksumFileAlgorithm should be in params map");
+    }
+
+    private static class MyFileEndpoint extends FileEndpoint {
+        public MyFileEndpoint(String uri, Component component) {
+            super(uri, component);
+        }
+
+        public Map<String, Object> getParams() {
+            return getParamsAsMap();
+        }
+    }
+}

Reply via email to