[ 
https://issues.apache.org/jira/browse/JOHNZON-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steven Walters updated JOHNZON-227:
-----------------------------------
    Attachment: johnzon-mapper-byte-array-to-hex.zip

> Serialization error when Adapter/Converter changes "arrayity" of type
> ---------------------------------------------------------------------
>
>                 Key: JOHNZON-227
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-227
>             Project: Johnzon
>          Issue Type: Bug
>          Components: Mapper
>    Affects Versions: 1.1.13
>            Reporter: Steven Walters
>            Priority: Major
>         Attachments: johnzon-mapper-byte-array-to-hex.zip
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to