Fix a bug in HashSegmentIteration.forEachTierWhile()

This commit is contained in:
leventov
2015-11-29 01:52:57 +03:00
parent 2d7e25985a
commit a0c982374d
4 changed files with 62 additions and 13 deletions
@@ -38,6 +38,8 @@ import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Set;
import java.util.function.BiFunction;
import java.util.function.Function;
@@ -464,4 +466,16 @@ public class VanillaChronicleMap<K, V, R>
return q.defaultReturnValue().returnValue();
}
}
public void verifyTierCountersAreaData() {
for (int i = 0; i < actualSegments; i++) {
try (MapSegmentContext<K, V, ?> c = segmentContext(i)) {
Method verifyTierCountersAreaData =
c.getClass().getMethod("verifyTierCountersAreaData");
verifyTierCountersAreaData.invoke(c);
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
throw new AssertionError(e);
}
}
}
}