fix for nullpointer

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3726 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 18 years ago
parent b05e2314cf
commit 65a8a9fc58

@ -931,12 +931,8 @@ public class bookmarksDB {
public int compare(Object obj1, Object obj2){
Bookmark bm1=getBookmark((String)obj1);
Bookmark bm2=getBookmark((String)obj2);
//XXX: what happens, if there is a big difference? (to much for int)
/*if(this.newestFirst){
return (new Long(bm2.getTimeStamp() - bm1.getTimeStamp())).intValue();
}else{
return (new Long(bm1.getTimeStamp() - bm2.getTimeStamp())).intValue();
}*/
if(bm1==null || bm2==null)
return 0; //XXX: i think this should not happen? maybe this needs further tracing of the bug
if(this.newestFirst){
if(bm2.getTimeStamp() - bm1.getTimeStamp() >0)
return 1;

Loading…
Cancel
Save