fix division by zero error

This commit is contained in:
kimchy 2011-05-19 13:54:12 +03:00
parent 3b5c133c71
commit 0d63fd68a8
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ public abstract class AbstractConcurrentMapFilterCache extends AbstractIndexComp
totalCount++; totalCount++;
} }
} }
return new EntriesStats(sizeInBytes, totalCount / segmentsCount); return new EntriesStats(sizeInBytes, segmentsCount == 0 ? 0 : totalCount / segmentsCount);
} }
@Override public Filter cache(Filter filterToCache) { @Override public Filter cache(Filter filterToCache) {