[
https://issues.apache.org/jira/browse/CXF-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847020#action_12847020
]
Michael Berkowitz commented on CXF-2720:
----------------------------------------
Hey, we’re grateful to you guys for CXF; it’s been a tremendous help to us.
We’re glad to pay back in some small measure.
> MapType doesn't deserialize subclass instances
> ----------------------------------------------
>
> Key: CXF-2720
> URL: https://issues.apache.org/jira/browse/CXF-2720
> Project: CXF
> Issue Type: Bug
> Components: Aegis Databinding
> Affects Versions: 2.2.6
> Environment: All
> Reporter: Michael Berkowitz
> Assignee: Daniel Kulp
> Fix For: 2.2.7
>
> Attachments: MapType.java
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Given an object of type {{Map<TKey, TValue>}}, where, say, {{TValue}} is a
> base class extended by {{TValuePrime}}, when a serialized instance contains a
> value of type {{TValuePrime}}, *MapType* will try to deserialize it as a
> {{TValue}}, ignoring the fact that it's really an instance of
> {{TValuePrime}}. In many cases this will throw an exception when trying to
> _set_ a member that exists only in {{TValuePrime}}. (We have observed this
> for the value class, but it should be true of the key class as well).
> We have fixed this - as far as we can tell - by swiping code from
> *ArrayType*, which handles these things correctly. We're attaching our new
> version of *MapType.java*.
> Lacking a deep understand of the Aegis code, we did this by intuition and
> trial-and-error, so it may be inefficient or even technically incorrect, but
> so far it works for us. Please get this fix, or its functional equivalent,
> into the codebase.
> Thanks in advance.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.