mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Div by zero
This commit is contained in:
@@ -222,6 +222,9 @@ public class PersistentHashMap<Key, Value> extends PersistentEnumeratorDelegate<
|
||||
if (fileSize > 5 * megabyte) { // file is longer than 5MB and (more than 50% of keys is garbage or approximate benefit larger than 100M)
|
||||
int liveKeys = (int)(myLiveAndGarbageKeysCounter / LIVE_KEY_MASK);
|
||||
int deadKeys = (int)(myLiveAndGarbageKeysCounter & 0xFFFFFFFF);
|
||||
|
||||
if (deadKeys < 50) return false;
|
||||
|
||||
final int benefitSize = 100 * megabyte;
|
||||
final long avgValueSize = fileSize / (liveKeys + deadKeys);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user