fixes for some changes in SVN 6797 that caused NPEs when the bookmarks initialized

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6800 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent dff660441a
commit 4917f96729

@ -72,6 +72,7 @@ public class BookmarkDate {
int count = 0;
while (it.hasNext()) {
bookmark=it.next();
if (bookmark == null) continue;
date = String.valueOf(bookmark.getTimeStamp());
bmDate=getDate(date);
if(bmDate==null){

@ -102,6 +102,7 @@ public class bookmarksDB {
String[] tagArray;
while(it.hasNext()){
bookmark = it.next();
if (bookmark == null) continue;
tagArray = BookmarkHelper.cleanTagsString(bookmark.getTagsString() + bookmark.getFoldersString()).split(",");
tag = null;
for (final String element : tagArray) {
@ -332,7 +333,7 @@ public class bookmarksDB {
public Bookmark getBookmark(final String urlHash){
try {
final Map<String, String> map = bookmarks.get(urlHash);
return (map == null) ? new Bookmark(map) : null;
return (map == null) ? null : new Bookmark(map);
} catch (final IOException e) {
return null;
}
@ -373,6 +374,7 @@ public class bookmarksDB {
Bookmark bm;
while(it.hasNext()){
bm=it.next();
if (bm == null) continue;
if(priv || bm.getPublic()){
set.add(bm.getUrlHash());
}
@ -866,17 +868,17 @@ public class bookmarksDB {
try {
return this.bookmarkIter.hasNext();
} catch (final kelondroException e) {
//resetDatabase();
Log.logException(e);
return false;
}
}
public Bookmark next() {
if (hasNext()) {
try {
String s = new String(this.bookmarkIter.next());
return getBookmark(s);
} else {
//resetDatabase();
} catch (final kelondroException e) {
Log.logException(e);
return null;
}
}

Loading…
Cancel
Save