[
https://issues.apache.org/jira/browse/IGNITE-21159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roman Puchkovskiy updated IGNITE-21159:
---------------------------------------
Description:
Instant is a final class, so we assume that an Instant field will always
contain an instance of Instant (so 'the type is known upfront'), so we apply an
optimization of not writing the descriptor ID for this field's content.
But at the same time, Instant defines writeReplace() which replaces it with an
instance of another type (Ser) when serializing, so the type can actually
change during serialization, so we cannot apply the optimization in such cases.
> Deserialization of Instant field in a Marshallable fails
> --------------------------------------------------------
>
> Key: IGNITE-21159
> URL: https://issues.apache.org/jira/browse/IGNITE-21159
> Project: Ignite
> Issue Type: Bug
> Reporter: Roman Puchkovskiy
> Assignee: Roman Puchkovskiy
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Instant is a final class, so we assume that an Instant field will always
> contain an instance of Instant (so 'the type is known upfront'), so we apply
> an optimization of not writing the descriptor ID for this field's content.
> But at the same time, Instant defines writeReplace() which replaces it with
> an instance of another type (Ser) when serializing, so the type can actually
> change during serialization, so we cannot apply the optimization in such
> cases.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)