Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

bugfix for http://www.yacy-forum.de/viewtopic.php?p=33838#33838

orbiterfcdf000fbc79
diff --git a/source/de/anomic/kelondro/kelondroFlexTable.java b/source/de/anomic/kelondro/kelondroFlexTable.java
index c6e7a8b3b..d060f1e1c 100644
--- a/source/de/anomic/kelondro/kelondroFlexTable.java
+++ b/source/de/anomic/kelondro/kelondroFlexTable.java
@@ -285,6 +285,8 @@ public class kelondroFlexTable extends kelondroFlexWidthArray implements kelondr
}
public synchronized kelondroCloneableIterator rows(boolean up, byte[] firstKey) throws IOException {
+ if (ROindex == null) return new rowIterator(RWindex, up, firstKey);
+ if (RWindex == null) return new rowIterator(ROindex, up, firstKey);
return new kelondroMergeIterator(
new rowIterator(ROindex, up, firstKey),
new rowIterator(RWindex, up, firstKey),
diff --git a/source/de/anomic/server/serverInstantThread.java b/source/de/anomic/server/serverInstantThread.java
index 100f4ae99..2c056f22f 100644
--- a/source/de/anomic/server/serverInstantThread.java
+++ b/source/de/anomic/server/serverInstantThread.java
@@ -120,7 +120,7 @@ public final class serverInstantThread extends serverAbstractThread implements s
String targetException = e.getTargetException().getMessage();
e.getTargetException().printStackTrace();
e.printStackTrace();
- if ((targetException.indexOf("heap space") > 0) || (targetException.indexOf("NullPointerException") > 0)) e.getTargetException().printStackTrace();
+ if ((targetException != null) && ((targetException.indexOf("heap space") > 0) || (targetException.indexOf("NullPointerException") > 0))) e.getTargetException().printStackTrace();
serverLog.logSevere("SERVER", "Runtime Error in serverInstantThread.job, thread '" + this.getName() + "': " + e.getMessage() + "; target exception: " + targetException, e.getTargetException());
e.getTargetException().printStackTrace();
} catch (OutOfMemoryError e) {