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

Add allowNull option to @Converter to allow type converters to return null as valid response for special use-cases

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.11.1
    • 2.11.2, 2.12.0
    • camel-core
    • None
    • Unknown

    Description

      See nabble
      http://camel.465427.n5.nabble.com/Xpath-parameter-binding-NodeList-vs-Node-tp5738067.html

      This avoids the situation with the NodeList -> Node converter that may return null the 1st time, and then its regarded as a misses for conversion in future attempts.

      Just be annotation the method from
      @Converter

      to:
      @Converter(allowNull = true)

      Should allow to fix this. As then the type converter registry knows that a null response is valid.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: