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