This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 7d10d520ae502ffab61145143fd45554fbef9567 Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Wed Jan 4 17:42:51 2023 +0100 (chores) camel-file: avoid risky unboxing --- .../src/main/java/org/apache/camel/component/file/FileEndpoint.java | 2 +- .../main/java/org/apache/camel/component/file/GenericFileConsumer.java | 2 +- .../java/org/apache/camel/component/file/GenericFileOnCompletion.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java b/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java index b61c4c0119e..f200d9dc160 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java @@ -128,7 +128,7 @@ public class FileEndpoint extends GenericFileEndpoint<File> { } // if idempotent and no repository set then create a default one - if (isIdempotentSet() && isIdempotent() && idempotentRepository == null) { + if (isIdempotentSet() && Boolean.TRUE.equals(isIdempotent()) && idempotentRepository == null) { LOG.info("Using default memory based idempotent repository with cache max size: {}", DEFAULT_IDEMPOTENT_CACHE_SIZE); idempotentRepository = MemoryIdempotentRepository.memoryIdempotentRepository(DEFAULT_IDEMPOTENT_CACHE_SIZE); } diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java index a73072ffe72..1b7b8adf562 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java @@ -592,7 +592,7 @@ public abstract class GenericFileConsumer<T> extends ScheduledBatchPollingConsum // if it is a file then check we have the file in the idempotent registry // already - if (endpoint.isIdempotent()) { + if (Boolean.TRUE.equals(endpoint.isIdempotent())) { if (notUnique(file)) { return false; } diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java index e6b6bfb6914..921165de152 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java @@ -111,7 +111,7 @@ public class GenericFileOnCompletion<T> implements Synchronization { */ protected void processStrategyCommit( GenericFileProcessStrategy<T> processStrategy, Exchange exchange, GenericFile<T> file) { - if (endpoint.isIdempotent()) { + if (Boolean.TRUE.equals(endpoint.isIdempotent())) { // use absolute file path as default key, but evaluate if an // expression key was configured
