mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
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
This commit is contained in:
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…
Reference in New Issue
Block a user