From 4c11843ebab6297ba16017f0ebdae0ba0e83369d Mon Sep 17 00:00:00 2001 From: low012 Date: Tue, 10 Feb 2009 23:46:51 +0000 Subject: [PATCH] *) fixed small bug with large effect (OOM exception hazard when "show all" was selected for a blacklist) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5594 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Blacklist_p.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htroot/Blacklist_p.java b/htroot/Blacklist_p.java index 34bb67887..afb7a597f 100644 --- a/htroot/Blacklist_p.java +++ b/htroot/Blacklist_p.java @@ -403,8 +403,13 @@ public class Blacklist_p { int start = -1; if (sortedlist.length > 0) { while (end < sortedlist.length) { - start = entryCount * size; - end = (entryCount + 1) * size; + if (size > 0) { + start = entryCount * size; + end = (entryCount + 1) * size; + } else { + start = 0; + end = sortedlist.length; + } prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_value", start); prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_fvalue", start + 1); if (end > sortedlist.length) {