fix for Nullpointer Exception when adding a bookmark

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1256 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 19 years ago
parent 09c95544c0
commit 2982715a04

@ -303,7 +303,11 @@ public class bookmarksDB {
mem.put(BOOKMARK_URL, url);
try {
Map oldmap= bookmarksTable.get(this.urlHash);
mem.put(BOOKMARK_TIMESTAMP, oldmap.get(BOOKMARK_TIMESTAMP)); //preserve timestamp on edit
if(oldmap != null && oldmap.containsKey(BOOKMARK_TIMESTAMP)){
mem.put(BOOKMARK_TIMESTAMP, oldmap.get(BOOKMARK_TIMESTAMP)); //preserve timestamp on edit
}else{
mem.put(BOOKMARK_TIMESTAMP, String.valueOf(System.currentTimeMillis()));
}
removeBookmark(this.urlHash); //prevent empty tags
} catch (IOException e) {
//entry not yet present (normal case)

Loading…
Cancel
Save