From 3587407039070e42c4bae83176a00891d3d95d87 Mon Sep 17 00:00:00 2001 From: theli Date: Thu, 8 Sep 2005 22:27:48 +0000 Subject: [PATCH] *) Fixing problems of list operation if index and queue size are both 0. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@687 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaSwitchboardQueue.java | 1 + 1 file changed, 1 insertion(+) 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++) {