*) 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
pull/1/head
hydrox 19 years ago
parent a26574c894
commit 8ab1d6ff4b

@ -194,7 +194,8 @@ public final class plasmaWordIndexEntity {
// returns true if there was an entry before, false if the key did not exist // 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 // if after the removal the file is empty, then the file can be deleted if
// the flag deleteComplete is set. // 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(); if ((theIndex.size() == 0) && (deleteComplete)) deleteComplete();
return wasEntry; return wasEntry;
} }

Loading…
Cancel
Save