ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Takahashi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-9201) Immutables derived values aren't properly set on deserialization
Date Mon, 06 Aug 2018 23:32:00 GMT
Glen Takahashi created IGNITE-9201:

             Summary: 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

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

View raw message