ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Kulichenko (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-4062) BinaryObject header should not participate in equals test
Date Wed, 12 Oct 2016 21:32:20 GMT
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

View raw message