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

Bean deserialisation from YAML displays message displays wrong nodeType

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.4.1
    • 4.4.3, 4.7.0
    • camel-yaml-dsl
    • None
    • quarkusPlatformVersion=3.8.3
      camel 4.4.1

    Description

      actual:

      When deserializing a bean with a sequence (which is unfortunate not possible). The error  'Unsupported type: MAPPING' is thrown.

      expected:

      When deserializing a bean with a sequence . The error  'Unsupported type: SEQUENCE' is thrown.

       

      cause:

      In YamlDeserializerSupport at line 188 there is a switch on val.genNodeType, val is the node  with the type, the error is however thrown on the mapping node.

      switch (val.getNodeType()) {
          case SCALAR:
              answer.put(StringHelper.dashToCamelCase(key), asText(val));
              break;
          case MAPPING:
              answer.put(StringHelper.dashToCamelCase(key), asMap(val));
              break;
          default:
              throw new UnsupportedNodeTypeException(node); // <- node should be val

      I believe this error is not fixed on the main

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            tonbosma Ton Bosma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: