You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/05/12 03:53:40 UTC

[GitHub] [rocketmq] cserwen commented on a diff in pull request #4281: [ISSUE #4280] Polish the method 'indexKeyHashMethod' in class 'IndexFile'.

cserwen commented on code in PR #4281:
URL: https://github.com/apache/rocketmq/pull/4281#discussion_r870924447


##########
store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java:
##########
@@ -145,12 +145,9 @@ public boolean putKey(final String key, final long phyOffset, final long storeTi
         return false;
     }
 
-    public int indexKeyHashMethod(final String key) {
+    private int indexKeyHashMethod(final String key) {
         int keyHash = key.hashCode();
-        int keyHashPositive = Math.abs(keyHash);

Review Comment:
   Will hashcode equal the minimum value of int? 



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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org