Skip to content

Commit

Permalink
Fix some unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jankotek committed Jan 17, 2013
1 parent 5dd2086 commit 33a8269
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/mapdb/BTreeMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ public void addModificationListener(Bind.MapListener<K,V> listener) {
public void removeModificationListener(Bind.MapListener<K,V> listener) {
synchronized (modListenersLock){
for(int i=0;i<modListeners.length;i++){
if(modListeners[i]==listener) modListeners=null;
if(modListeners[i]==listener) modListeners[i]=null;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/mapdb/HTreeMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ public void addModificationListener(Bind.MapListener<K,V> listener) {
public void removeModificationListener(Bind.MapListener<K,V> listener) {
synchronized (modListenersLock){
for(int i=0;i<modListeners.length;i++){
if(modListeners[i]==listener) modListeners=null;
if(modListeners[i]==listener) modListeners[i]=null;
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/mapdb/SerializerBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ public Object deserialize(DataInput is, FastArrayList<Object> objectStack) throw
ret = deserializeArrayObjectPackedLong(is);
break;
case ARRAY_OBJECT_ALL_NULL:
ret = deserializeArrayObjectAllNull(is, objectStack);
ret = deserializeArrayObjectAllNull(is);
break;
case ARRAY_OBJECT_NO_REFS:
ret = deserializeArrayObjectNoRefs(is);
Expand Down Expand Up @@ -1216,11 +1216,10 @@ private Object[] deserializeArrayObjectNoRefs(DataInput is) throws IOException {
}


private Object[] deserializeArrayObjectAllNull(DataInput is, FastArrayList<Object> objectStack) throws IOException {
private Object[] deserializeArrayObjectAllNull(DataInput is) throws IOException {
int size = Utils.unpackInt(is);
Class clazz = deserializeClass(is);
Object[] s = (Object[]) Array.newInstance(clazz, size);
objectStack.add(s);
return s;
}

Expand Down

0 comments on commit 33a8269

Please sign in to comment.