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 a7f8dbcb7fc0d63e4ceddd3a62b6461205a88616 Author: Otavio R. Piske <angusyo...@gmail.com> AuthorDate: Sun May 26 13:46:30 2024 +0200 (chores) camel-file: use final when possible Signed-off-by: Otavio R. Piske <angusyo...@gmail.com> --- .../apache/camel/component/file/AntPathMatcherFileFilter.java | 2 +- .../java/org/apache/camel/component/file/FileConsumer.java | 2 +- .../apache/camel/component/file/GenericFileOnCompletion.java | 10 +++++----- .../file/strategy/FileRenameExclusiveReadLockStrategy.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/AntPathMatcherFileFilter.java b/components/camel-file/src/main/java/org/apache/camel/component/file/AntPathMatcherFileFilter.java index 7f9d0aa8e4c..a42d86488cf 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/AntPathMatcherFileFilter.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/AntPathMatcherFileFilter.java @@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory; public class AntPathMatcherFileFilter implements FileFilter { private static final Logger LOG = LoggerFactory.getLogger(AntPathMatcherFileFilter.class); - private AntPathMatcher matcher = new AntPathMatcher(); + private final AntPathMatcher matcher = new AntPathMatcher(); private String[] excludes; private String[] includes; private boolean caseSensitive = true; diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/FileConsumer.java b/components/camel-file/src/main/java/org/apache/camel/component/file/FileConsumer.java index 1d0c768dd82..8ea6d2d7440 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/FileConsumer.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/FileConsumer.java @@ -49,7 +49,7 @@ public class FileConsumer extends GenericFileConsumer<File> implements ResumeAwa private static final Logger LOG = LoggerFactory.getLogger(FileConsumer.class); private ResumeStrategy resumeStrategy; - private String endpointPath; + private final String endpointPath; private Set<String> extendedAttributes; public FileConsumer(FileEndpoint endpoint, Processor processor, GenericFileOperations<File> operations, 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 921165de152..c90a04925af 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 @@ -34,12 +34,12 @@ import org.slf4j.LoggerFactory; public class GenericFileOnCompletion<T> implements Synchronization { private static final Logger LOG = LoggerFactory.getLogger(GenericFileOnCompletion.class); - private GenericFileEndpoint<T> endpoint; - private GenericFileOperations<T> operations; - private GenericFileProcessStrategy<T> processStrategy; + private final GenericFileEndpoint<T> endpoint; + private final GenericFileOperations<T> operations; + private final GenericFileProcessStrategy<T> processStrategy; private ExceptionHandler exceptionHandler; - private GenericFile<T> file; - private String absoluteFileName; + private final GenericFile<T> file; + private final String absoluteFileName; public GenericFileOnCompletion(GenericFileEndpoint<T> endpoint, GenericFileOperations<T> operations, GenericFileProcessStrategy processStrategy, GenericFile<T> file, diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java index b528a984836..307e22f71bd 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java @@ -35,7 +35,7 @@ import org.apache.camel.component.file.GenericFileOperations; */ public class FileRenameExclusiveReadLockStrategy extends GenericFileRenameExclusiveReadLockStrategy<File> { - private MarkerFileExclusiveReadLockStrategy marker = new MarkerFileExclusiveReadLockStrategy(); + private final MarkerFileExclusiveReadLockStrategy marker = new MarkerFileExclusiveReadLockStrategy(); private boolean markerFile = true; @Override