accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-2559) Value.equals implementation is not symmetric
Date Wed, 26 Mar 2014 18:05:20 GMT
Mike Drob created ACCUMULO-2559:
-----------------------------------

             Summary: Value.equals implementation is not symmetric
                 Key: ACCUMULO-2559
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2559
             Project: Accumulo
          Issue Type: Bug
            Reporter: Mike Drob


{code}
  @Override
  public boolean equals(Object right_obj) {
    if (right_obj instanceof byte[]) {
      return compareTo((byte[]) right_obj) == 0;
    }
    if (right_obj instanceof Value) {
      return compareTo(right_obj) == 0;
    }
    return false;
  }
{code}

Also, {{Value extends WritableComparable<Object>}} which makes the {{compareTo}} method
suspect as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message