[ https://issues.apache.org/jira/browse/JOHNZON-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau resolved JOHNZON-227. ---------------------------------------- Resolution: Fixed Assignee: Romain Manni-Bucau Fix Version/s: 1.1.14 Note: fixed by enabling dynamic mode, we can revisit that solution to introspect adapters if there is any perf concern - but since it is very local it should be ok. > 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 > Assignee: Romain Manni-Bucau > Priority: Major > Fix For: 1.1.14 > > 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)