Koloboke
Koloboke copied to clipboard
Cursor.setValue(V) does not set the curValue
I was iterating through a HashMap with a cursor and called the setValue(V) method to replace the current value. The new value was set in the vals[] array but did not replaced the curValue.
MutableLHashSeparateKVIntObjMapGO.java
@Override
public void setValue(V value) {
if (curKey != free) {
if (expectedModCount == modCount()) {
vals[index] = value;
if (vals != values) {
values[index] = value;
}
} else {
throw new java.util.ConcurrentModificationException();
}
} else {
throw new java.lang.IllegalStateException();
}
}