Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-9201

Immutables derived values aren't properly set on deserialization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 2.6
    • None
    • cache
    • None
    • Docs Required

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gtakahashi@palantir.com Glen Takahashi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: