You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/06/01 20:29:18 UTC

[GitHub] [geode] pivotal-jbarrett commented on a change in pull request #4866: GEODE-7864: Overriding hashCode when equals is overridden.

pivotal-jbarrett commented on a change in pull request #4866:
URL: https://github.com/apache/geode/pull/4866#discussion_r433471017



##########
File path: geode-junit/src/main/java/org/apache/geode/pdx/TestObjectForJSONFormatter.java
##########
@@ -992,6 +993,31 @@ boolean compareMaps(Map m1, Map m2) {
     return true;
   }
 
+  @Override
+  public int hashCode() {
+    int result = Objects.hash(p_bool, p_byte, p_short, p_int, p_long, p_float, p_double, w_bool,

Review comment:
       What about:
   ```java
   return Arrays.deepHashCode(new Object[] {p_pool, p_poolArray, ...});
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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