Uploaded image for project: 'Johnzon'
  1. Johnzon
  2. JOHNZON-227

Serialization error when Adapter/Converter changes "arrayity" of type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.13
    • 1.2.0
    • Mapper
    • None

    Description

      When using an Adapter on a data type field where the "arrayity" of the field changes, such as the case of `byte[]` to `String` adapter (such as serializing binary as hexadecimal instead of base64)
      Mapper works without issue when deserializing/reading the data, but causes an IllegalArgumentException "This is not an array" when attempting to serialize the object.
      This seems to be related to how the mapper reader caches the field's "arrayity" and does not expect/allow it to be changed by an adapter/converter.

      Small junit suite that reproduces the functioning deserialization and failing serialization is attached.

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            steven.walters Steven Walters
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: