You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Glen Takahashi (JIRA)" <ji...@apache.org> on 2018/08/07 18:09:00 UTC

[jira] [Resolved] (IGNITE-9201) Immutables derived values aren't properly set on deserialization

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

Glen Takahashi resolved IGNITE-9201.
------------------------------------
    Resolution: Not A Problem

> Immutables derived values aren't properly set on deserialization
> ----------------------------------------------------------------
>
>                 Key: IGNITE-9201
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9201
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.6
>            Reporter: Glen Takahashi
>            Priority: Major
>
> When using the @Value.Derived annotation for an Immutables class, the Immutables-generated class implementation sets those values as `transient` because they are meant to be constructed by the builder. 
> Because Ignite ignores transient variables when marshalling to a BinaryObject, and also because Ignite uses reflection to unmarshal from a BinaryObject, those transient variables are left uninitialized in the returned Immutables object from the cache.
> One idea would be instead to use an ObjectMapper and store a string/json representation in the cache and deserialize manually with the ObjectMapper, but was hoping there would be a better way to natively support Immutables and/or Jackson-serializable objects by not using Reflection in some cases.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)