diff --git a/source/de/anomic/crawler/Balancer.java b/source/de/anomic/crawler/Balancer.java index cbf9fb748..f0145314e 100644 --- a/source/de/anomic/crawler/Balancer.java +++ b/source/de/anomic/crawler/Balancer.java @@ -176,7 +176,7 @@ public class Balancer { public synchronized CrawlEntry get(String urlhash) throws IOException { assert urlhash != null; - if (urlFileIndex == null) return null; // case occurrs during shutdown + if (urlFileIndex == null) return null; // case occurs during shutdown kelondroRow.Entry entry = urlFileIndex.get(urlhash.getBytes()); if (entry == null) return null; return new CrawlEntry(entry); diff --git a/source/de/anomic/crawler/CrawlQueues.java b/source/de/anomic/crawler/CrawlQueues.java index 105cdf5c6..f871fd874 100644 --- a/source/de/anomic/crawler/CrawlQueues.java +++ b/source/de/anomic/crawler/CrawlQueues.java @@ -101,6 +101,7 @@ public class CrawlQueues { public yacyURL getURL(String urlhash) { assert urlhash != null; + if (urlhash == null || urlhash.length() == 0) return null; CrawlEntry ne = noticeURL.get(urlhash); if (ne != null) return ne.url(); ZURL.Entry ee = delegatedURL.getEntry(urlhash); diff --git a/source/de/anomic/kelondro/kelondroRowSet.java b/source/de/anomic/kelondro/kelondroRowSet.java index 25103ee88..38363f0a4 100644 --- a/source/de/anomic/kelondro/kelondroRowSet.java +++ b/source/de/anomic/kelondro/kelondroRowSet.java @@ -186,6 +186,7 @@ public class kelondroRowSet extends kelondroRowCollection implements kelondroInd if ((this.rowdef.objectOrder != null) && (this.rowdef.objectOrder instanceof kelondroBase64Order) && (this.sortBound > 4000)) { // first try to find in sorted area + assert this.rowdef.objectOrder.wellformed(a, astart, alength) : "not wellformed: " + new String(a, astart, alength); final byte[] compiledPivot = compilePivot(a, astart, alength); int p = binarySearchCompiledPivot(compiledPivot); if (p >= 0) return p;