Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-174

binding-dom-codec: fix UnionTypeCodec.deserialize()

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 6028

    Description

      UnionTypeCodec.deserialize() invokes the default char[] constructor, which requires adaptation to/from String. As evidenced in BUG-6006, this is not enough and the solution to that issue is a bit hacky.

      YANG defines the order in which the members should be tried, hence UnionCodec should decode the appropriate member class and invoke the proper constructor for the member – we already have UnionValueOptionContext, which can hold this information.

      This has a slight problem in potentially mis-matching types (in case of union of string and binary), hence binding codecs should expose a value-based check if the invocation should even be tried.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: