diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.java index 822684aa5..805a9e2de 100644 --- a/htroot/SettingsAck_p.java +++ b/htroot/SettingsAck_p.java @@ -424,8 +424,7 @@ public class SettingsAck_p { for (int i=0; i= 0) : "get: access with index " + index + " is below zero"; assert (index < chunkcount) : "get: access with index " + index + " is above chunkcount " + chunkcount + "; sortBound = " + sortBound; - assert (index * rowdef.objectsize < chunkcache.length); + assert (chunkcache != null && index * rowdef.objectsize < chunkcache.length); assert sortBound <= chunkcount : "sortBound = " + sortBound + ", chunkcount = " + chunkcount; if ((chunkcache == null) || (rowdef == null)) return null; // case may appear during shutdown kelondroRow.Entry entry; diff --git a/source/de/anomic/plasma/plasmaSearchRankingProcess.java b/source/de/anomic/plasma/plasmaSearchRankingProcess.java index 4fcc1825c..9e4304d88 100644 --- a/source/de/anomic/plasma/plasmaSearchRankingProcess.java +++ b/source/de/anomic/plasma/plasmaSearchRankingProcess.java @@ -115,14 +115,12 @@ public final class plasmaSearchRankingProcess { // join and exclude the local result timer = System.currentTimeMillis(); final indexContainer index = - (this.localSearchContainerMaps == null) ? - plasmaWordIndex.emptyContainer(null, 0) : - indexContainer.joinExcludeContainers( - this.localSearchContainerMaps[0].values(), - this.localSearchContainerMaps[1].values(), - query.maxDistance); + indexContainer.joinExcludeContainers( + this.localSearchContainerMaps[0].values(), + this.localSearchContainerMaps[1].values(), + query.maxDistance); serverProfiling.update("SEARCH", new plasmaProfiling.searchEvent(query.id(true), plasmaSearchEvent.JOIN, index.size(), System.currentTimeMillis() - timer)); - if ((index == null) || (index.size() == 0)) { + if (index.size() == 0) { return; } diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.java index 3f2885338..c6d2d1e76 100644 --- a/source/de/anomic/plasma/plasmaWordIndex.java +++ b/source/de/anomic/plasma/plasmaWordIndex.java @@ -424,7 +424,7 @@ public final class plasmaWordIndex implements indexRI { // flush elements that are too big. This flushing depends on the fact that the flush rule // selects the biggest elements first for flushing. If it does not for any reason, the following // loop would not terminate. - serverProfiling.update("wordcache", new Long(cs)); + serverProfiling.update("wordcache", Long.valueOf(cs)); // To ensure termination an additional counter is used int l = 0; while ((l++ < 100) && (theCache.maxURLinCache() > wCacheMaxChunk)) { @@ -435,7 +435,7 @@ public final class plasmaWordIndex implements indexRI { (serverMemory.available() < collections.minMem())) { flushCache(theCache, Math.min(theCache.size() - theCache.getMaxWordCount() + 1, theCache.size())); } - if (cacheSize() != cs) serverProfiling.update("wordcache", new Long(cacheSize())); + if (cacheSize() != cs) serverProfiling.update("wordcache", Long.valueOf(cacheSize())); } }