Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

better control of sortBound; should help to avoid an indexOutOfBound Exception

orbiter9dfae90da889
diff --git a/source/de/anomic/kelondro/kelondroRowCollection.java b/source/de/anomic/kelondro/kelondroRowCollection.java
index d0cfda72e..e35249105 100644
--- a/source/de/anomic/kelondro/kelondroRowCollection.java
+++ b/source/de/anomic/kelondro/kelondroRowCollection.java
@@ -361,17 +361,6 @@ public class kelondroRowCollection {
}
}
- protected final void sort(kelondroOrder newOrder, int newColumn) {
- if ((this.sortOrder == null) ||
- (!(this.sortOrder.signature().equals(newOrder.signature()))) ||
- (newColumn != this.sortColumn)) {
- this.sortOrder = newOrder;
- this.sortBound = 0;
- this.sortColumn = newColumn;
- }
- sort();
- }
-
protected final void sort() {
assert (this.sortOrder != null);
if (this.sortBound == this.chunkcount) return; // this is already sorted
diff --git a/source/de/anomic/kelondro/kelondroRowSet.java b/source/de/anomic/kelondro/kelondroRowSet.java
index 662a54c56..594d01e08 100644
--- a/source/de/anomic/kelondro/kelondroRowSet.java
+++ b/source/de/anomic/kelondro/kelondroRowSet.java
@@ -223,6 +223,7 @@ public class kelondroRowSet extends kelondroRowCollection implements kelondroInd
if ((this.sortOrder == null) ||
(!(this.sortOrder.signature().equals(newOrder.signature()))) ||
(newColumn != this.sortColumn)) {
+ resolveMarkedRemoved();
this.sortOrder = newOrder;
this.sortBound = 0;
this.sortColumn = newColumn;