Skip to content

Commit

Permalink
Index builder: bug fix for temporarily cached index builder instances
Browse files Browse the repository at this point in the history
  • Loading branch information
christian gruen committed Oct 25, 2010
1 parent 301f189 commit 0938166
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/basex/index/ValueBuilder.java
Expand Up @@ -126,12 +126,12 @@ private int merge() throws IOException {
min = 0;
ml.reset();
for(int i = 0; i < csize; ++i) {
if(min == i || vm[i].token.length == 0) continue;
if(min == i || vm[i].pre.length == 0) continue;
final int d = diff(vm[min].token, vm[i].token);
if(d > 0 || vm[min].token.length == 0) {
if(d > 0 || vm[min].pre.length == 0) {
min = i;
ml.reset();
} else if(d == 0 && vm[i].token.length != 0) {
} else if(d == 0 && vm[i].pre.length != 0) {
if(ml.size() == 0) ml.add(min);
ml.add(i);
}
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/basex/index/ValueMerge.java
@@ -1,7 +1,6 @@
package org.basex.index;

import static org.basex.data.DataText.*;
import static org.basex.util.Token.*;
import java.io.IOException;
import org.basex.core.cmd.DropDB;
import org.basex.data.Data;
Expand Down Expand Up @@ -53,7 +52,6 @@ void next() throws IOException {
if(pre.length != 0) {
token = di.readBytes();
} else {
token = EMPTY;
v.close();
di.close();
DropDB.drop(data.meta.name, pref + '.' + IO.BASEXSUFFIX, data.meta.prop);
Expand Down

0 comments on commit 0938166

Please sign in to comment.