*) bugfix in bookmarksDB:

- NullpointerException when trying to get an unknown bookmark
   - bookmarks can either start with http or https

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3427 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 18 years ago
parent b466baa574
commit bd03c6b874

@ -322,6 +322,7 @@ public class bookmarksDB {
public Bookmark getBookmark(String urlHash){
try {
kelondroObjectsMapEntry map = (kelondroObjectsMapEntry)bookmarksTable.get(urlHash);
if (map == null) return null;
if (map instanceof Bookmark) return (Bookmark)map;
return new Bookmark(map);
} catch (IOException e) {
@ -733,7 +734,7 @@ public class bookmarksDB {
}
public Bookmark(String url){
super();
if(!url.toLowerCase().startsWith("http://")){
if(!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://")){
url="http://"+url;
}
this.urlHash=plasmaURL.urlHash(url);

Loading…
Cancel
Save