[ 
https://issues.apache.org/jira/browse/CAMEL-19399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nicolas Filotto updated CAMEL-19399:
------------------------------------
    Description: 
If an error occurs while converting a value thanks to the 
{{CxfPayloadConverter}}, the value {{null}} is returned to let other fallback 
converters to try but if there are no such fallback converters, the cache of 
converters will keep the information that no converter exists which is not 
incorrect.

The behavior described above occurs when the unit test 
{{CxfPayloadConverterTest#testInvalidByteArrayToCxfPayload}} is called before 
{{CxfPayloadConverterTest#testByteArrayToCxfPayload}, in that case, Camel 
believes that there is no converter for a byte array so it returns {{null}}. 

The corresponding failing test report 
https://ci-builds.apache.org/job/Camel/job/Camel%20JDK17/job/main/876/testReport/org.apache.camel.component.cxf.converter/CxfPayloadConverterTest/testByteArrayToCxfPayload/

  was:
If an error occurs while converting a value thanks to the 
{{CxfPayloadConverter}}, the value {{null}} is returned to let other fallback 
converters to try but if there are no such fallback converters, the cache of 
converters will keep the information that no converter exists which is not 
incorrect.

The behavior described above occurs when the unit test 
{{CxfPayloadConverterTest#testInvalidByteArrayToCxfPayload}} is called before 
{{CxfPayloadConverterTest#testByteArrayToCxfPayload}, in that case, Camel 
believes that there is no converter for a byte array so it returns `null`. 

The corresponding failing test report 
https://ci-builds.apache.org/job/Camel/job/Camel%20JDK17/job/main/876/testReport/org.apache.camel.component.cxf.converter/CxfPayloadConverterTest/testByteArrayToCxfPayload/


> camel-cxf: Prevent storing invalid entry in Converter cache on error
> --------------------------------------------------------------------
>
>                 Key: CAMEL-19399
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19399
>             Project: Camel
>          Issue Type: Bug
>          Components: came-cxf
>    Affects Versions: 3.18.7, 3.20.4, 4.0-M3
>            Reporter: Nicolas Filotto
>            Assignee: Nicolas Filotto
>            Priority: Major
>             Fix For: 3.18.8, 3.20.6, 3.21.0, 4.0-RC1
>
>
> If an error occurs while converting a value thanks to the 
> {{CxfPayloadConverter}}, the value {{null}} is returned to let other fallback 
> converters to try but if there are no such fallback converters, the cache of 
> converters will keep the information that no converter exists which is not 
> incorrect.
> The behavior described above occurs when the unit test 
> {{CxfPayloadConverterTest#testInvalidByteArrayToCxfPayload}} is called before 
> {{CxfPayloadConverterTest#testByteArrayToCxfPayload}, in that case, Camel 
> believes that there is no converter for a byte array so it returns {{null}}. 
> The corresponding failing test report 
> https://ci-builds.apache.org/job/Camel/job/Camel%20JDK17/job/main/876/testReport/org.apache.camel.component.cxf.converter/CxfPayloadConverterTest/testByteArrayToCxfPayload/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to