You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dm...@apache.org on 2019/01/17 14:08:56 UTC

[camel] branch camel-2.23.x updated (24d0858 -> 57e4dfe)

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

dmvolod pushed a change to branch camel-2.23.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 24d0858  CAMEL-13072 remove the exception block
     new 30388a7  CAMEL-13063: Olingo2Endpoint swallowing consumer. options
     new 0039755  CAMEL-13054: Olingo4Endpoint - avoid swallowing consumer options
     new 940b18c  CAMEL-13061: Missing properties on Olingo2 consumer initialisation
     new 1072bf5  CAMEL-13059: camel-olingo2 assumes '/' at end of URI
     new 57e4dfe  CAMEL-13058: AbstractFutureCallback generates NPE when response is a 401

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:
 .../camel/component/olingo2/api/impl/AbstractFutureCallback.java  | 3 +--
 .../apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java   | 2 +-
 components/camel-olingo2/camel-olingo2-component/pom.xml          | 3 ++-
 .../java/org/apache/camel/component/olingo2/Olingo2Endpoint.java  | 8 ++++++++
 .../java/org/apache/camel/component/olingo4/Olingo4Endpoint.java  | 8 ++++++++
 5 files changed, 20 insertions(+), 4 deletions(-)


[camel] 02/05: CAMEL-13054: Olingo4Endpoint - avoid swallowing consumer options

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

dmvolod pushed a commit to branch camel-2.23.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 00397557e28859a3c5415c50b1bb72872e00463a
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Tue Jan 15 08:47:23 2019 +0000

    CAMEL-13054: Olingo4Endpoint - avoid swallowing consumer options
    
    * Those options prefixed with 'consumer' are required to be processed by
      Olingo4Endpoint's parent class. However, they are getting added to the
      query options instead and never applied to the scheduling consumer.
      closes #2708
---
 .../java/org/apache/camel/component/olingo4/Olingo4Endpoint.java  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
index 109bfba..62e94a3 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
@@ -196,6 +196,14 @@ public class Olingo4Endpoint extends AbstractApiEndpoint<Olingo4ApiName, Olingo4
             final Map.Entry<String, Object> entry = it.next();
             final String paramName = entry.getKey();
 
+            /**
+             * Avoid swallowing consumer scheduler properties, which
+             * get processed in configureProperties()
+             */
+            if (paramName.startsWith("consumer.")) {
+                continue;
+            }
+
             if (!endpointPropertyNames.contains(paramName)) {
 
                 // add to query params


[camel] 04/05: CAMEL-13059: camel-olingo2 assumes '/' at end of URI

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

dmvolod pushed a commit to branch camel-2.23.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1072bf54dadb8803a1852f084cc584c7860bbe52
Author: Dmitry Volodin <dm...@gmail.com>
AuthorDate: Tue Jan 15 12:40:14 2019 +0300

    CAMEL-13059: camel-olingo2 assumes '/' at end of URI
---
 .../org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
index eb1537e..adf7d99 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
@@ -1014,7 +1014,7 @@ public final class Olingo2AppImpl implements Olingo2App {
 
         final StringBuilder absolutUri = new StringBuilder(serviceUri).append(SEPARATOR).append(resourcePath);
         if (queryParams != null && !queryParams.isEmpty()) {
-            absolutUri.append("/?");
+            absolutUri.append("?");
             int nParams = queryParams.size();
             int index = 0;
             for (Map.Entry<String, String> entry : queryParams.entrySet()) {


[camel] 01/05: CAMEL-13063: Olingo2Endpoint swallowing consumer. options

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

dmvolod pushed a commit to branch camel-2.23.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 30388a75dc1ac931de4c8941cf3ba082c668f89c
Author: Dmitry Volodin <dm...@gmail.com>
AuthorDate: Wed Jan 16 13:34:08 2019 +0300

    CAMEL-13063: Olingo2Endpoint swallowing consumer. options
---
 .../java/org/apache/camel/component/olingo2/Olingo2Endpoint.java  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
index 3324393..31709b4 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
@@ -195,6 +195,14 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
 
             final Map.Entry<String, Object> entry = it.next();
             final String paramName = entry.getKey();
+            
+            /**
+             * Avoid swallowing consumer scheduler properties, which
+             * get processed in configureProperties()
+             */
+            if (paramName.startsWith("consumer.")) {
+                continue;
+            }
 
             if (!endpointPropertyNames.contains(paramName)) {
 


[camel] 05/05: CAMEL-13058: AbstractFutureCallback generates NPE when response is a 401

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

dmvolod pushed a commit to branch camel-2.23.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 57e4dfe9746d501c2002496242a1a0c9eb75121d
Author: Dmitry Volodin <dm...@gmail.com>
AuthorDate: Tue Jan 15 11:43:36 2019 +0300

    CAMEL-13058: AbstractFutureCallback generates NPE when response is a 401
---
 .../camel/component/olingo2/api/impl/AbstractFutureCallback.java       | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/AbstractFutureCallback.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/AbstractFutureCallback.java
index 08df91f..ea64815 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/AbstractFutureCallback.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/AbstractFutureCallback.java
@@ -55,8 +55,7 @@ public abstract class AbstractFutureCallback<T> implements FutureCallback<HttpRe
                 try {
                     final ContentType responseContentType = getContentTypeHeader(response);
 
-                    final String mimeType = responseContentType.getMimeType();
-                    if (ODATA_MIME_TYPE.matcher(mimeType).matches()) {
+                    if (responseContentType != null && ODATA_MIME_TYPE.matcher(responseContentType.getMimeType()).matches()) {
                         final ODataErrorContext errorContext = EntityProvider.readErrorDocument(
                             response.getEntity().getContent(),
                             responseContentType.toString());


[camel] 03/05: CAMEL-13061: Missing properties on Olingo2 consumer initialisation

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

dmvolod pushed a commit to branch camel-2.23.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 940b18c48635730a6e911da5cbc563d24f7a4f77
Author: Dmitry Volodin <dm...@gmail.com>
AuthorDate: Tue Jan 15 13:29:53 2019 +0300

    CAMEL-13061: Missing properties on Olingo2 consumer initialisation
---
 components/camel-olingo2/camel-olingo2-component/pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/camel-olingo2/camel-olingo2-component/pom.xml b/components/camel-olingo2/camel-olingo2-component/pom.xml
index d7e0c9e..4c13391 100644
--- a/components/camel-olingo2/camel-olingo2-component/pom.xml
+++ b/components/camel-olingo2/camel-olingo2-component/pom.xml
@@ -169,7 +169,6 @@
                   <apiName />
                   <proxyClass>org.apache.camel.component.olingo2.api.Olingo2App</proxyClass>
                   <fromSignatureFile>src/signatures/olingo-api-signature.txt</fromSignatureFile>
-                  <excludeConfigNames>edm|responseHandler</excludeConfigNames>
                   <extraOptions>
                     <extraOption>
                       <name>keyPredicate</name>
@@ -179,6 +178,8 @@
                   <nullableOptions>
                     <nullableOption>queryParams</nullableOption>
                     <nullableOption>endpointHttpHeaders</nullableOption>
+                    <nullableOption>edm</nullableOption>
+                    <nullableOption>responseHandler</nullableOption>
                   </nullableOptions>
                 </api>
               </apis>