提交 c9318893 authored 作者: Andrei Tokar's avatar Andrei Tokar

assertions added to help with #1201 investigation

上级 038b19b6
......@@ -505,9 +505,12 @@ public class MVStore implements AutoCloseable {
M map;
if (id >= 0) {
map = openMap(id, builder);
assert builder.getKeyType() == null || map.getKeyType().getClass().equals(builder.getKeyType().getClass());
assert builder.getValueType() == null || map.getValueType().getClass().equals(builder.getValueType().getClass());
} else {
HashMap<String, Object> c = new HashMap<>();
id = lastMapId.incrementAndGet();
assert getMap(id) == null;
c.put("id", id);
c.put("createVersion", currentVersion);
map = builder.create(this, c);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论