From 8ab1d6ff4b77ac56426fe4e5555102a4d96766ff Mon Sep 17 00:00:00 2001 From: hydrox Date: Tue, 14 Feb 2006 11:40:36 +0000 Subject: [PATCH] *) fixed NullPointerException in plasmaWordIndexEntity See: http://www.yacy-forum.de/viewtopic.php?t=1921 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1638 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaWordIndexEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/plasma/plasmaWordIndexEntity.java b/source/de/anomic/plasma/plasmaWordIndexEntity.java index 2a0b4083c..148732c6a 100644 --- a/source/de/anomic/plasma/plasmaWordIndexEntity.java +++ b/source/de/anomic/plasma/plasmaWordIndexEntity.java @@ -194,7 +194,8 @@ public final class plasmaWordIndexEntity { // returns true if there was an entry before, false if the key did not exist // if after the removal the file is empty, then the file can be deleted if // the flag deleteComplete is set. - boolean wasEntry = (theIndex.remove(urlHash.getBytes()) != null); + if (urlHash == null || theIndex == null) return false; + boolean wasEntry = (theIndex.remove(urlHash.getBytes()) != null); if ((theIndex.size() == 0) && (deleteComplete)) deleteComplete(); return wasEntry; }