- don't accept malformed bookmarks, fix for: http://www.yacy-forum.de/viewtopic.php?t=3414 (first report)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3238 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
karlchenofhell 18 years ago
parent bc30dd6b24
commit 3c43e605ba

@ -417,7 +417,9 @@ public class bookmarksDB {
}
}
public Bookmark createBookmark(String url){
return new Bookmark(url);
if (url == null || url.length() == 0) return null;
Bookmark bk = new Bookmark(url);
return (bk.getUrlHash() == null || bk.getMap() == null) ? null : bk;
}
public Iterator tagIterator(boolean up){
try {
@ -686,7 +688,7 @@ public class bookmarksDB {
}else{
list=new ArrayList();
}
if(!list.contains(urlHash) && !urlHash.equals("")){
if(!list.contains(urlHash) && urlHash != null && !urlHash.equals("")){
list.add(urlHash);
}
this.mem.put(URL_HASHES, listManager.arraylist2string(list));

Loading…
Cancel
Save