[ https://issues.apache.org/jira/browse/IGNITE-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Ozerov updated IGNITE-2104: ------------------------------------ Component/s: interop > Marshalling fails with Binary marshaller if class hierarchy contains > duplicate field names > ------------------------------------------------------------------------------------------ > > Key: IGNITE-2104 > URL: https://issues.apache.org/jira/browse/IGNITE-2104 > Project: Ignite > Issue Type: Bug > Components: general, interop > Affects Versions: 1.5 > Reporter: Alexey Goncharuk > Fix For: 1.5 > > > Binary marshaller writes {{fieldId}} which is calculated solely on the field > name. If a class hierarchy contains fields with the same name, marshalling > will fail: > {code} > class ClassA{ > private int field; > } > class ClassB extends ClassA { > private int field; > } > {code} > Even though a private field with the same name in parent and child classes is > a error-prone approach, default serialization supports this. > Possible solutions: > * Keep it as it is now and properly document. The issue appeared only in an > artificial test. No other tests on TC revealed duplicate fields. > * Write all serializable classes in old format. While this solution works > perfectly for the marshalling, it will require objects to be deserialized on > server nodes in order for indexing to work, which defeats the purpose of > BinaryMarshaller > * Inspect the class at runtime and use new format if no duplicate fields are > detected, and print a warning message and switch to the old format otherwise. -- This message was sent by Atlassian JIRA (v6.3.4#6332)