You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Valentin Kulichenko (JIRA)" <ji...@apache.org> on 2016/10/12 21:32:20 UTC
[jira] [Created] (IGNITE-4062) BinaryObject header should not
participate in equals test
Valentin Kulichenko created IGNITE-4062:
-------------------------------------------
Summary: BinaryObject header should not participate in equals test
Key: IGNITE-4062
URL: https://issues.apache.org/jira/browse/IGNITE-4062
Project: Ignite
Issue Type: Bug
Components: binary
Affects Versions: 1.7
Reporter: Valentin Kulichenko
Priority: Critical
Fix For: 1.8
{{BinaryObject.equals()}} compares the full byte array, which can give incorrect results in come cases. For example, we sometimes write full class name instead of type ID, so two objects that are equal from user's standpoint will have different binary representation and {{equals()}} will return false.
We should make {{equals()}} implementation more smart and compare separately:
* type ID
* hash code
* portion of byte array that contains actual data, i.e. fields without header and footer
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)