fix bug in method reset of ByteBufferHashTable.java (#5100)

This commit is contained in:
zhangxinyu1 2017-11-18 00:19:16 +08:00 committed by Roman Leventov
parent ec6774039e
commit 590633c595
1 changed files with 4 additions and 0 deletions

View File

@ -118,6 +118,10 @@ public class ByteBufferHashTable
tableStart = tableArenaSize - maxBuckets * bucketSizeWithHash;
int nextBuckets = maxBuckets * 2;
while (true) {
long nextBucketsSize = (long) nextBuckets * bucketSizeWithHash;
if (nextBucketsSize > Integer.MAX_VALUE) {
break;
}
final int nextTableStart = tableStart - nextBuckets * bucketSizeWithHash;
if (nextTableStart > tableArenaSize / 2) {
tableStart = nextTableStart;