【发布时间】:2016-11-03 15:56:36
【问题描述】:
当我将元素添加到 IndexedCollection 时,我目前收到此错误:
HIGHEST: null
java.lang.NullPointerException
at java.util.concurrent.ConcurrentSkipListMap.doGet(ConcurrentSkipListMap.java:778)
at java.util.concurrent.ConcurrentSkipListMap.get(ConcurrentSkipListMap.java:1546)
at com.googlecode.cqengine.index.support.AbstractMapBasedAttributeIndex.addAll(AbstractMapBasedAttributeIndex.java:81)
at com.googlecode.cqengine.engine.CollectionQueryEngine$12.perform(CollectionQueryEngine.java:1125)
at com.googlecode.cqengine.engine.CollectionQueryEngine.forEachIndexDo(CollectionQueryEngine.java:1206)
at com.googlecode.cqengine.engine.CollectionQueryEngine.addAll(CollectionQueryEngine.java:1122)
at com.googlecode.cqengine.ConcurrentIndexedCollection.add(ConcurrentIndexedCollection.java:351)
我尝试调试以查看是否传递了一个空值,但我没有。我要添加的对象有一个空 DateTime 但相应的索引已经返回空,而不是当它为空时。
我认为解决这个问题最终归结为经验,@npgall 你有没有遇到过这个问题,如果有,你是如何解决的?
【问题讨论】: