Skip to content

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

*) Fixing problems of list operation if index and queue size are both 0.

theli358740703907
diff --git a/source/de/anomic/plasma/plasmaSwitchboardQueue.java b/source/de/anomic/plasma/plasmaSwitchboardQueue.java
index 5ae1b94eb..7b2daaf9d 100644
--- a/source/de/anomic/plasma/plasmaSwitchboardQueue.java
+++ b/source/de/anomic/plasma/plasmaSwitchboardQueue.java
@@ -122,6 +122,7 @@ public class plasmaSwitchboardQueue {
}
public ArrayList list(int index) throws IOException {
+ if ((index==0) && (sbQueueStack.size()==0)) return new ArrayList(0);
if ((index < 0) || (index >= sbQueueStack.size())) throw new ArrayIndexOutOfBoundsException();
ArrayList list = sbQueueStack.botList(index);
for (int i=0; i < list.size(); i++) {