Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19399

camel-cxf - Prevent storing invalid entry in Converter cache on error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.18.7, 3.20.4, 4.0-M3
    • 3.18.8, 3.20.6, 3.21.0, 4.0-RC1
    • came-cxf
    • None
    • Unknown

    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/

      Attachments

        Issue Links

          Activity

            People

              nfilotto Nicolas Filotto
              nfilotto Nicolas Filotto
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: