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 2019/10/26 08:53:48 UTC

[camel] branch master updated: Fix camel-box upload "check" parameter, as not required (#3281)

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


The following commit(s) were added to refs/heads/master by this push:
     new 870ad10  Fix camel-box upload "check" parameter, as not required (#3281)
870ad10 is described below

commit 870ad10be3fc4ca0c251e96056b9ff95abb36240
Author: Claudio Miranda <cl...@claudius.com.br>
AuthorDate: Sat Oct 26 05:53:35 2019 -0300

    Fix camel-box upload "check" parameter, as not required (#3281)
---
 .../main/java/org/apache/camel/component/box/api/BoxFilesManager.java | 4 ++--
 components/camel-box/camel-box-component/pom.xml                      | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFilesManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFilesManager.java
index 8faa3ac..63efa68 100644
--- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFilesManager.java
+++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFilesManager.java
@@ -148,7 +148,7 @@ public class BoxFilesManager {
      * @return The uploaded file.
      */
     public BoxFile uploadFile(String parentFolderId, InputStream content, String fileName, Date created, Date modified,
-            Long size, boolean check, ProgressListener listener) {
+            Long size, Boolean check, ProgressListener listener) {
         try {
             LOG.debug("Uploading file with name '" + fileName + "' to parent_folder(id=" + parentFolderId + ")");
             if (parentFolderId == null) {
@@ -162,7 +162,7 @@ public class BoxFilesManager {
             }
             BoxFile boxFile = null;
             boolean uploadNewFile = true;
-            if (check) {
+            if (check != null && check) {
                 BoxSearchManager bsm = new BoxSearchManager(boxConnection);
                 Collection<BoxItem> res = bsm.searchFolder(parentFolderId, fileName);
                 if (!res.isEmpty()) {
diff --git a/components/camel-box/camel-box-component/pom.xml b/components/camel-box/camel-box-component/pom.xml
index ca95df8..361dc9c 100644
--- a/components/camel-box/camel-box-component/pom.xml
+++ b/components/camel-box/camel-box-component/pom.xml
@@ -343,6 +343,7 @@
                                         <nullableOption>unshareDate</nullableOption>
                                         <nullableOption>permissions</nullableOption>
                                         <nullableOption>typeName</nullableOption>
+                                        <nullableOption>check</nullableOption>
                                     </nullableOptions>
                                 </api>
                                 <api>