You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/01/13 03:11:26 UTC

[GitHub] [zookeeper] maoling commented on a change in pull request #1214: ZOOKEEPER-3686: Use JDK Arrays hashCode for Jute

maoling commented on a change in pull request #1214: ZOOKEEPER-3686: Use JDK Arrays hashCode for Jute
URL: https://github.com/apache/zookeeper/pull/1214#discussion_r365636788
 
 

 ##########
 File path: zookeeper-jute/src/main/java/org/apache/jute/compiler/JBuffer.java
 ##########
 @@ -79,7 +79,7 @@ public String genJavaEquals(String fname, String peer) {
     }
 
     public String genJavaHashCode(String fname) {
-        return "    ret = java.util.Arrays.toString(" + fname + ").hashCode();\n";
+        return "    ret = java.util.Arrays.hashCode(" + fname + ");\n";
     }
 
 Review comment:
   - their will generate different `hashcode`?
   - these two methods accept `array` parameter, not support the parameter `string`?

----------------------------------------------------------------
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


With regards,
Apache Git Services