Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
more robustness for broken table data in Table_API_p.html -- see bug report http://mantis.tokeek.de/view.php?id=495
Michael Peter Christencdc21d43b1cf
diff --git a/htroot/Table_API_p.java b/htroot/Table_API_p.javaindex e86601925..bd2fe1357 100644--- a/htroot/Table_API_p.java+++ b/htroot/Table_API_p.java@@ -245,29 +245,27 @@ public class Table_API_p {boolean dark = true;boolean scheduledactions = false;int c = 0;+ byte[] typeb, commentb, urlb;String type, comment, url;// first prepare a listwhile (mapIterator.hasNext()) {r = mapIterator.next();- if (r == null) {- continue;- }- type = UTF8.String(r.get(WorkTables.TABLE_API_COL_TYPE));- if (!typefilter.matcher(type).matches()) {- continue;- }- comment = UTF8.String(r.get(WorkTables.TABLE_API_COL_COMMENT));- url = UTF8.String(r.get(WorkTables.TABLE_API_COL_URL));- if (!(query.matcher(comment).matches() || query.matcher(url).matches())) {- continue;- }- if (c >= startRecord) {- table.add(r);- }+ if (r == null) continue;+ typeb = r.get(WorkTables.TABLE_API_COL_TYPE);+ if (typeb == null) continue;+ type = UTF8.String(typeb);+ if (!typefilter.matcher(type).matches()) continue;+ commentb = r.get(WorkTables.TABLE_API_COL_COMMENT);+ if (commentb == null) continue;+ comment = UTF8.String(commentb);+ if (!query.matcher(comment).matches()) continue;+ urlb = r.get(WorkTables.TABLE_API_COL_URL);+ if (urlb == null) continue;+ url = UTF8.String(urlb);+ if (!query.matcher(url).matches()) continue;+ if (c >= startRecord) table.add(r);c++;- if (table.size() >= maximumRecords) {- break;- }+ if (table.size() >= maximumRecords) break;}// then work on the listfor (final Tables.Row row : table) {