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:51:06 UTC

[camel] branch CAMEL-19279/fix-checkstyle-issues updated (82ece948d77 -> 0eb52811325)

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


 discard 82ece948d77 CAMEL-19279: Fix checkstyle issues
     new 0eb52811325 CAMEL-19279: Fix checkstyle violations

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (82ece948d77)
            \
             N -- N -- N   refs/heads/CAMEL-19279/fix-checkstyle-issues (0eb52811325)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:


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

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 0eb5281132570dcfb2fc9b24916aecf621e59571
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Wed Jul 26 10:48:01 2023 +0200

    CAMEL-19279: Fix checkstyle violations
---
 .../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());
     }