You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/07/26 08:49:09 UTC

[camel] branch CAMEL-19279/fix-checkstyle-issues created (now 82ece948d77)

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

nfilotto pushed a change to branch CAMEL-19279/fix-checkstyle-issues
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 82ece948d77 CAMEL-19279: Fix checkstyle issues

This branch includes the following new commits:

     new 82ece948d77 CAMEL-19279: Fix checkstyle issues

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 01/01: CAMEL-19279: Fix checkstyle issues

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch CAMEL-19279/fix-checkstyle-issues
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 82ece948d7707989852ff6cf9d0ed41d8d106d55
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Wed Jul 26 10:48:01 2023 +0200

    CAMEL-19279: Fix checkstyle issues
---
 .../org/apache/camel/component/file/azure/FilesConsumer.java     | 2 +-
 .../java/org/apache/camel/component/file/azure/FilesPath.java    | 4 ++--
 .../java/org/apache/camel/component/file/azure/FilesToken.java   | 9 ++++++---
 .../org/apache/camel/component/file/azure/FilesURIStrings.java   | 3 +++
 .../apache/camel/component/file/azure/NormalizedOperations.java  | 2 +-
 .../camel/component/file/azure/FilesConfigurationTests.java      | 4 +---
 6 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesConsumer.java b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesConsumer.java
index 0ade389b101..8c593a7cfb3 100644
--- a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesConsumer.java
+++ b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesConsumer.java
@@ -210,7 +210,7 @@ public class FilesConsumer extends RemoteFileConsumer<ShareFileItem> {
         answer.setEndpointPath(endpointPath);
         answer.setFile(file);
         answer.setFileNameOnly(file.getName());
-        if (file.isDirectory() == false) {
+        if (!file.isDirectory()) {
             answer.setFileLength(file.getFileSize());
             answer.setLastModified(lastModified(file));
         }
diff --git a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesPath.java b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesPath.java
index 141e95a07de..2637bc5162b 100644
--- a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesPath.java
+++ b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesPath.java
@@ -22,7 +22,7 @@ package org.apache.camel.component.file.azure;
  * The absolute paths start with the path separator, they do not include the share name and they are relative to the
  * share root rather than to the endpoint starting directory.
  */
-public class FilesPath {
+public final class FilesPath {
 
     public static final String PARENT = "..";
 
@@ -126,7 +126,7 @@ public class FilesPath {
         }
 
         var includeRoot = preserveRootAsStep && path.startsWith(SHARE_ROOT);
-        if (!(includeRoot)) {
+        if (!includeRoot) {
             path = ensureRelative(path);
         }
 
diff --git a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesToken.java b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesToken.java
index 2a718d758d1..902b86ab9ff 100644
--- a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesToken.java
+++ b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesToken.java
@@ -149,12 +149,15 @@ final class FilesToken {
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         FilesToken other = (FilesToken) obj;
         return Objects.equals(sdd, other.sdd) && Objects.equals(se, other.se)
                 && Objects.equals(si, other.si) && Objects.equals(sig, other.sig)
diff --git a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesURIStrings.java b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesURIStrings.java
index 5a3268e70fb..28c5ec65f12 100644
--- a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesURIStrings.java
+++ b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesURIStrings.java
@@ -32,6 +32,9 @@ final class FilesURIStrings {
 
     public static final char QUERY_SEPARATOR = '?';
 
+    private FilesURIStrings() {
+    }
+
     /**
      * Get the base uri part before the options as they can be non URI valid such as the expression using $ chars and
      * the URI constructor will regard $ as an illegal character and we don't want to enforce end users to to escape the
diff --git a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/NormalizedOperations.java b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/NormalizedOperations.java
index 05b6cbbe24c..bb76f6ccf48 100644
--- a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/NormalizedOperations.java
+++ b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/NormalizedOperations.java
@@ -54,6 +54,6 @@ abstract class NormalizedOperations implements RemoteFileOperations<ShareFileIte
     }
 
     /** Normalized form of {@link #buildDirectory(String, boolean)}. */
-    abstract protected boolean buildDirectory(String path);
+    protected abstract boolean buildDirectory(String path);
 
 }
diff --git a/components/camel-azure/camel-azure-files/src/test/java/org/apache/camel/component/file/azure/FilesConfigurationTests.java b/components/camel-azure/camel-azure-files/src/test/java/org/apache/camel/component/file/azure/FilesConfigurationTests.java
index 5b2e47d3a07..419e4e493de 100644
--- a/components/camel-azure/camel-azure-files/src/test/java/org/apache/camel/component/file/azure/FilesConfigurationTests.java
+++ b/components/camel-azure/camel-azure-files/src/test/java/org/apache/camel/component/file/azure/FilesConfigurationTests.java
@@ -47,7 +47,7 @@ public class FilesConfigurationTests extends CamelTestSupport {
     }
 
     @Test
-    void hostForAccountURIShouldDefaultTo_file_core_windows_netSuffix() {
+    void hostForAccountURIShouldDefaultToFileCoreWindowsNetSuffix() {
         var remoteConf = context.getEndpoint("azure-files://account/share", FilesEndpoint.class).getConfiguration();
         assertEquals("account.file.core.windows.net", remoteConf.getHost());
     }
@@ -127,7 +127,6 @@ public class FilesConfigurationTests extends CamelTestSupport {
     @Test
     void dirForValidDirectoryNameURIShouldBeExtracted2() {
         var remoteConf = context.getEndpoint("azure-files://account/share/dir?", FilesEndpoint.class).getConfiguration();
-        ;
         assertEquals("/dir", remoteConf.getDirectory());
         assertEquals("/dir", remoteConf.getDirectoryName());
     }
@@ -135,7 +134,6 @@ public class FilesConfigurationTests extends CamelTestSupport {
     @Test
     void dirForValidDirectoryNameURIShouldBeExtracted3() {
         var remoteConf = context.getEndpoint("azure-files://account/share/dir/?", FilesEndpoint.class).getConfiguration();
-        ;
         assertEquals("/dir", remoteConf.getDirectory());
         assertEquals("/dir", remoteConf.getDirectoryName());
     }