accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] keith-turner commented on a change in pull request #313: ACCUMULO-4726 Add Value.contentEquals(byte[]) method
Date Thu, 01 Jan 1970 00:00:00 GMT
keith-turner commented on a change in pull request #313: ACCUMULO-4726 Add Value.contentEquals(byte[])
method
URL: https://github.com/apache/accumulo/pull/313#discussion_r145848739
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/data/Value.java
 ##########
 @@ -242,16 +242,16 @@ public int compareTo(final byte[] that) {
 
   @Override
   public boolean equals(Object right_obj) {
-    // compare with byte[] for backwards compatibility, but this is generally a pretty bad
practice
-    if (right_obj instanceof byte[]) {
-      return compareTo((byte[]) right_obj) == 0;
 
 Review comment:
   Could throw an exception in this case.  That way if anyone was relying on this behavior
it fails cleanly.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message