You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/03/12 15:25:20 UTC

[camel] branch master updated (15da1bc -> 5dfe75e)

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

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


    from 15da1bc  Make the test more stable and only run if enabled via maven profile.
     new af050f6  Removed unusued import
     new 0827484  Upgrade leveldb
     new 92834c9  CAMEL-12337: camel-ftp - ignoreFileNotFoundOrPermissionError should also ignore dir not found or list dir permission error.
     new fd57dd5  Fixed CS
     new 5dfe75e  Updated leveldb

The 5 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:
 .../src/main/java/MySpringBootRouter.java          |  1 -
 .../camel/component/file/remote/FtpConsumer.java   | 63 +++++++++++-----------
 .../camel/component/file/remote/SftpConsumer.java  | 49 ++++++++---------
 components/camel-leveldb/pom.xml                   |  1 -
 parent/pom.xml                                     |  4 +-
 5 files changed, 58 insertions(+), 60 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

[camel] 04/05: Fixed CS

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

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

commit fd57dd5676b7f015389609919a78a936f71cb277
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 12 15:54:08 2018 +0100

    Fixed CS
---
 .../java/org/apache/camel/component/file/remote/FtpConsumer.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
index 09e6742..d9e9d85 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

[camel] 02/05: Upgrade leveldb

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

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

commit 082748411b87d71cffc0fbbd0514e98d316490e4
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 12 15:30:55 2018 +0100

    Upgrade leveldb
---
 components/camel-leveldb/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-leveldb/pom.xml b/components/camel-leveldb/pom.xml
index c3f9d68..af14c8b 100644
--- a/components/camel-leveldb/pom.xml
+++ b/components/camel-leveldb/pom.xml
@@ -46,7 +46,7 @@
             org.iq80.leveldb;resolution:=optional,
             org.iq80.leveldb.impl;resolution:=optional
         </camel.osgi.import.pkg>
-        <leveldb-version>0.9</leveldb-version>
+        <leveldb-version>0.10</leveldb-version>
     </properties>
 
     <dependencies>

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

[camel] 05/05: Updated leveldb

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

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

commit 5dfe75e955c620e39bd4cd00f86a049069c1298f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 12 15:54:31 2018 +0100

    Updated leveldb
---
 components/camel-leveldb/pom.xml | 1 -
 parent/pom.xml                   | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/components/camel-leveldb/pom.xml b/components/camel-leveldb/pom.xml
index af14c8b..03641eb 100644
--- a/components/camel-leveldb/pom.xml
+++ b/components/camel-leveldb/pom.xml
@@ -46,7 +46,6 @@
             org.iq80.leveldb;resolution:=optional,
             org.iq80.leveldb.impl;resolution:=optional
         </camel.osgi.import.pkg>
-        <leveldb-version>0.10</leveldb-version>
     </properties>
 
     <dependencies>
diff --git a/parent/pom.xml b/parent/pom.xml
index afabf65..ac0d242 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -451,8 +451,8 @@
     <kubernetes-model-version>2.0.4</kubernetes-model-version>
     <kxml2-bundle-version>2.3.0_3</kxml2-bundle-version>
     <leveldbjni-version>1.8</leveldbjni-version>
-    <leveldb-api-version>0.9</leveldb-api-version>
-    <leveldb-version>0.9</leveldb-version>
+    <leveldb-api-version>0.10</leveldb-api-version>
+    <leveldb-version>0.10</leveldb-version>
     <libphonenumber-version>8.8.11</libphonenumber-version>
     <libphonenumber-bundle-version>8.8.11_1</libphonenumber-bundle-version>
     <!-- virtual dependency only used by Eclipse m2e -->

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

[camel] 03/05: CAMEL-12337: camel-ftp - ignoreFileNotFoundOrPermissionError should also ignore dir not found or list dir permission error.

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

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

commit 92834c96e66fe117e6d714b981d0be339ecfd1b5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 12 15:49:48 2018 +0100

    CAMEL-12337: camel-ftp - ignoreFileNotFoundOrPermissionError should also ignore dir not found or list dir permission error.
---
 .../camel/component/file/remote/FtpConsumer.java   | 69 +++++++++++-----------
 .../camel/component/file/remote/SftpConsumer.java  | 49 +++++++--------
 2 files changed, 59 insertions(+), 59 deletions(-)

diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
index 24a4637..09e6742 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -43,7 +43,7 @@ import org.apache.commons.net.ftp.FTPFile;
 public class FtpConsumer extends RemoteFileConsumer<FTPFile> {
 
     protected String endpointPath;
-   
+
     private transient String ftpConsumerToString;
 
     public FtpConsumer(RemoteFileEndpoint<FTPFile> endpoint, Processor processor, RemoteFileOperations<FTPFile> fileOperations) {
@@ -71,7 +71,7 @@ public class FtpConsumer extends RemoteFileConsumer<FTPFile> {
                 } catch (GenericFileOperationFailedException e) {
                     // log a WARN as we want to start the consumer.
                     log.warn("Error auto creating directory: " + endpoint.getConfiguration().getDirectory()
-                            + " due " + e.getMessage() + ". This exception is ignored.", e);
+                        + " due " + e.getMessage() + ". This exception is ignored.", e);
                 }
             }
         } finally {
@@ -119,40 +119,40 @@ public class FtpConsumer extends RemoteFileConsumer<FTPFile> {
         dirName = FileUtil.stripTrailingSeparator(dirName);
 
         // compute dir depending on stepwise is enabled or not
-        String dir;
-        if (isStepwise()) {
-            dir = ObjectHelper.isNotEmpty(dirName) ? dirName : absolutePath;
-            operations.changeCurrentDirectory(dir);
-        } else {
-            dir = absolutePath;
-        }
-
-        log.trace("Polling directory: {}", dir);
+        String dir = null;
         List<FTPFile> files = null;
-        if (isUseList()) {
-            try {
+        try {
+            if (isStepwise()) {
+                dir = ObjectHelper.isNotEmpty(dirName) ? dirName : absolutePath;
+                operations.changeCurrentDirectory(dir);
+            } else {
+                dir = absolutePath;
+            }
+
+            log.trace("Polling directory: {}", dir);
+            if (isUseList()) {
                 if (isStepwise()) {
                     files = operations.listFiles();
                 } else {
                     files = operations.listFiles(dir);
                 }
-            } catch (GenericFileOperationFailedException e) {
-                if (ignoreCannotRetrieveFile(null, null, e)) {
-                    log.debug("Cannot list files in directory {} due directory does not exists or file permission error.", dir);
-                } else {
-                    throw e;
+            } else {
+                // we cannot use the LIST command(s) so we can only poll a named file
+                // so created a pseudo file with that name
+                FTPFile file = new FTPFile();
+                file.setType(FTPFile.FILE_TYPE);
+                fileExpressionResult = evaluateFileExpression();
+                if (fileExpressionResult != null) {
+                    file.setName(fileExpressionResult);
+                    files = new ArrayList<FTPFile>(1);
+                    files.add(file);
                 }
             }
-        } else {
-            // we cannot use the LIST command(s) so we can only poll a named file
-            // so created a pseudo file with that name
-            FTPFile file = new FTPFile();
-            file.setType(FTPFile.FILE_TYPE);
-            fileExpressionResult = evaluateFileExpression();
-            if (fileExpressionResult != null) {
-                file.setName(fileExpressionResult);
-                files = new ArrayList<FTPFile>(1);
-                files.add(file);
+        } catch (GenericFileOperationFailedException e) {
+            if (ignoreCannotRetrieveFile(null, null, e)) {
+                log.debug("Cannot list files in directory {} due directory does not exists or file permission error.", dir);
+            } else {
+                throw e;
             }
         }
 
@@ -164,8 +164,7 @@ public class FtpConsumer extends RemoteFileConsumer<FTPFile> {
             // we found some files
             log.trace("Found {} in directory: {}", files.size(), dir);
         }
-        
-        
+
         if (getEndpoint().isPreSort()) {
             Collections.sort(files, (a, b) -> a.getName().compareTo(b.getName()));
         }
@@ -262,10 +261,10 @@ public class FtpConsumer extends RemoteFileConsumer<FTPFile> {
         // create a pseudo absolute name
         String dir = FileUtil.stripTrailingSeparator(absolutePath);
         String fileName = file.getName();
-        if (((FtpConfiguration)endpoint.getConfiguration()).isHandleDirectoryParserAbsoluteResult()) {
+        if (((FtpConfiguration) endpoint.getConfiguration()).isHandleDirectoryParserAbsoluteResult()) {
             fileName = FtpUtils.extractDirNameFromAbsolutePath(file.getName());
         }
-        String absoluteFileName =  FileUtil.stripLeadingSeparator(dir + "/" + fileName);
+        String absoluteFileName = FileUtil.stripLeadingSeparator(dir + "/" + fileName);
         // if absolute start with a leading separator otherwise let it be relative
         if (absolute) {
             absoluteFileName = "/" + absoluteFileName;
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConsumer.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConsumer.java
index 6a92015..fc8fc36 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConsumer.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConsumer.java
@@ -108,39 +108,40 @@ public class SftpConsumer extends RemoteFileConsumer<SftpRemoteFile> {
 
         // remove trailing /
         dirName = FileUtil.stripTrailingSeparator(dirName);
-        // compute dir depending on stepwise is enabled or not
-        String dir;
-        if (isStepwise()) {
-            dir = ObjectHelper.isNotEmpty(dirName) ? dirName : absolutePath;
-            operations.changeCurrentDirectory(dir);
-        } else {
-            dir = absolutePath;
-        }
 
-        log.trace("Polling directory: {}", dir);
+        // compute dir depending on stepwise is enabled or not
+        String dir = null;
         List<SftpRemoteFile> files = null;
-        if (isUseList()) {
-            try {
+        try {
+            if (isStepwise()) {
+                dir = ObjectHelper.isNotEmpty(dirName) ? dirName : absolutePath;
+                operations.changeCurrentDirectory(dir);
+            } else {
+                dir = absolutePath;
+            }
+
+            log.trace("Polling directory: {}", dir);
+            if (isUseList()) {
                 if (isStepwise()) {
                     files = operations.listFiles();
                 } else {
                     files = operations.listFiles(dir);
                 }
-            } catch (GenericFileOperationFailedException e) {
-                if (ignoreCannotRetrieveFile(null, null, e)) {
-                    log.debug("Cannot list files in directory {} due directory does not exists or file permission error.", dir);
-                } else {
-                    throw e;
+            } else {
+                // we cannot use the LIST command(s) so we can only poll a named file
+                // so created a pseudo file with that name
+                fileExpressionResult = evaluateFileExpression();
+                if (fileExpressionResult != null) {
+                    SftpRemoteFile file = new SftpRemoteFileSingle(fileExpressionResult);
+                    files = new ArrayList<SftpRemoteFile>(1);
+                    files.add(file);
                 }
             }
-        } else {
-            // we cannot use the LIST command(s) so we can only poll a named file
-            // so created a pseudo file with that name
-            fileExpressionResult = evaluateFileExpression();
-            if (fileExpressionResult != null) {
-                SftpRemoteFile file = new SftpRemoteFileSingle(fileExpressionResult);
-                files = new ArrayList<SftpRemoteFile>(1);
-                files.add(file);
+        } catch (GenericFileOperationFailedException e) {
+            if (ignoreCannotRetrieveFile(null, null, e)) {
+                log.debug("Cannot list files in directory {} due directory does not exists or file permission error.", dir);
+            } else {
+                throw e;
             }
         }
 

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

[camel] 01/05: Removed unusued import

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

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

commit af050f61a059f09b5e38dc2d1f4643f841563651
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 12 09:31:07 2018 +0100

    Removed unusued import
---
 .../resources/archetype-resources/src/main/java/MySpringBootRouter.java  | 1 -
 1 file changed, 1 deletion(-)

diff --git a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/src/main/java/MySpringBootRouter.java b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/src/main/java/MySpringBootRouter.java
index 236fbfd..6c5b93d 100644
--- a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/src/main/java/MySpringBootRouter.java
+++ b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/src/main/java/MySpringBootRouter.java
@@ -17,7 +17,6 @@
 package ${package};
 
 import org.apache.camel.builder.RouteBuilder;
-import org.springframework.context.annotation.Bean;
 import org.springframework.stereotype.Component;
 
 /**

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.