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/05/29 15:03:17 UTC

[camel] branch CAMEL-19399/prevent-invalid-cache-enty-on-error-3.21 created (now c7c997904fe)

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

nfilotto pushed a change to branch CAMEL-19399/prevent-invalid-cache-enty-on-error-3.21
in repository https://gitbox.apache.org/repos/asf/camel.git


      at c7c997904fe CAMEL-19399: camel-cxf - Don't add entry in Converter cache on error

This branch includes the following new commits:

     new c7c997904fe CAMEL-19399: camel-cxf - Don't add entry in Converter cache on error

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.



[camel] 01/01: CAMEL-19399: camel-cxf - Don't add entry in Converter cache on error

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

nfilotto pushed a commit to branch CAMEL-19399/prevent-invalid-cache-enty-on-error-3.21
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c7c997904fe4d8f6b36695af6e02457ee9fd01b5
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Mon May 29 17:02:53 2023 +0200

    CAMEL-19399: camel-cxf - Don't add entry in Converter cache on error
---
 .../org/apache/camel/component/cxf/converter/CxfPayloadConverter.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java b/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
index 9b5337d7277..918ee6965a5 100644
--- a/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
+++ b/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
@@ -179,9 +179,10 @@ public final class CxfPayloadConverter {
             } catch (RuntimeCamelException e) {
                 // the internal conversion to XML can throw an exception if the content is not XML
                 // ignore this and return MISS_VALUE to indicate that we cannot convert this
+                return (T) MISS_VALUE;
             }
             // no we could not do it currently
-            return (T) MISS_VALUE;
+            return null;
         }
         // Convert a CxfPayload into something else
         if (CxfPayload.class.isAssignableFrom(value.getClass())) {