You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pa...@apache.org on 2019/12/25 16:41:36 UTC

[camel] branch master updated: Restore behavior of FileEndpoint#chmodPermissionsAreValid which was accidentally broken by abbf817f05971772ac0744d807c8a7dc539e68f7 ("Use primitive types for variables that are never assigned null (as suggested by lgtm.com).").

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

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 91b72ba  Restore behavior of FileEndpoint#chmodPermissionsAreValid which was accidentally broken by abbf817f05971772ac0744d807c8a7dc539e68f7 ("Use primitive types for variables that are never assigned null (as suggested by lgtm.com).").
91b72ba is described below

commit 91b72bad82098d286b58b8e88a79b16613ca746a
Author: Pascal Schumacher <pa...@gmx.net>
AuthorDate: Wed Dec 25 17:40:50 2019 +0100

    Restore behavior of FileEndpoint#chmodPermissionsAreValid which was accidentally broken by abbf817f05971772ac0744d807c8a7dc539e68f7 ("Use primitive types for variables that are never assigned null (as suggested by lgtm.com).").
---
 .../src/main/java/org/apache/camel/component/file/FileEndpoint.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 e1b70f5..95a0ef1 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
@@ -351,7 +351,7 @@ public class FileEndpoint extends GenericFileEndpoint<File> {
         String permissionsString = chmod.trim().substring(chmod.length() - 3);  // if 4 digits chop off leading one
         for (int i = 0; i < permissionsString.length(); i++) {
             char c = permissionsString.charAt(i);
-            if (!Character.isDigit(c) || c > 7) {
+            if (!Character.isDigit(c) || Integer.parseInt(Character.toString(c)) > 7) {
                 return false;
             }
         }