mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-21 00:00:13 +02:00
fixed bug with crashed profile database
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@753 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
71a31f0902
commit
14bc880fa4
|
@ -111,14 +111,28 @@ public class plasmaCrawlProfile {
|
|||
next = null;
|
||||
}
|
||||
public boolean hasNext() {
|
||||
return handleIterator.hasNext();
|
||||
try {
|
||||
return handleIterator.hasNext();
|
||||
} catch (kelondroException e) {
|
||||
resetDatabase();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public Object next() {
|
||||
next = getEntry((String) handleIterator.next());
|
||||
return next;
|
||||
try {
|
||||
return getEntry((String) handleIterator.next());
|
||||
} catch (kelondroException e) {
|
||||
resetDatabase();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public void remove() {
|
||||
removeEntry(next.handle());
|
||||
if (next != null) try {
|
||||
Object handle = next.handle();
|
||||
if (handle != null) removeEntry((String) handle);
|
||||
} catch (kelondroException e) {
|
||||
resetDatabase();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user