From c48d2a2a02a0b8a8772e6b2e38345ab53f8a04ef Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 25 Apr 2014 09:23:10 +0200 Subject: [PATCH 01/10] npe fix --- source/net/yacy/kelondro/blob/Tables.java | 1 + 1 file changed, 1 insertion(+) diff --git a/source/net/yacy/kelondro/blob/Tables.java b/source/net/yacy/kelondro/blob/Tables.java index f03ea13a9..36a44d634 100644 --- a/source/net/yacy/kelondro/blob/Tables.java +++ b/source/net/yacy/kelondro/blob/Tables.java @@ -555,6 +555,7 @@ public class Tables implements Iterable { @Override protected Row next0() { + if (this.i == null) return null; Row r; while (this.i.hasNext()) { r = new Row(this.i.next()); From a3542f29b47bdeea42ffbf45856a8f8a6b1b8968 Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 25 Apr 2014 09:26:20 +0200 Subject: [PATCH 02/10] npe fix --- source/net/yacy/kelondro/blob/HeapReader.java | 1 + 1 file changed, 1 insertion(+) diff --git a/source/net/yacy/kelondro/blob/HeapReader.java b/source/net/yacy/kelondro/blob/HeapReader.java index b3aa9d190..0ed4d9921 100644 --- a/source/net/yacy/kelondro/blob/HeapReader.java +++ b/source/net/yacy/kelondro/blob/HeapReader.java @@ -761,6 +761,7 @@ public class HeapReader { @Override public Map.Entry next0() { + if (this.is == null) return null; try { byte b; int len; From 0d88f292dcbe716e09e636e54255036e8f7a942a Mon Sep 17 00:00:00 2001 From: Marc Nause Date: Fri, 2 May 2014 14:18:52 +0200 Subject: [PATCH 03/10] Key for parameter "blacklist name" is "list" in all servlets now. --- htroot/api/blacklists/add_entry_p.java | 2 +- htroot/api/blacklists/delete_entry_p.java | 2 +- htroot/api/blacklists/get_list_p.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htroot/api/blacklists/add_entry_p.java b/htroot/api/blacklists/add_entry_p.java index f5d7c081c..c9d3e5035 100644 --- a/htroot/api/blacklists/add_entry_p.java +++ b/htroot/api/blacklists/add_entry_p.java @@ -14,7 +14,7 @@ public class add_entry_p { private static final String RESULT_SUCCESS = "1"; private static final String XML_ITEM_STATUS = "status"; private static final String KEY_NEW_ENTRY = "entry"; - private static final String KEY_CURRENT_BLACKLIST = "blacklist"; + private static final String KEY_CURRENT_BLACKLIST = "list"; public static serverObjects respond(final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) { diff --git a/htroot/api/blacklists/delete_entry_p.java b/htroot/api/blacklists/delete_entry_p.java index a6844f05b..693ed9abf 100644 --- a/htroot/api/blacklists/delete_entry_p.java +++ b/htroot/api/blacklists/delete_entry_p.java @@ -14,7 +14,7 @@ public class delete_entry_p { private static final String RESULT_SUCCESS = "1"; private static final String XML_ITEM_STATUS = "status"; private static final String KEY_NEW_ENTRY = "entry"; - private static final String KEY_CURRENT_BLACKLIST = "blacklist"; + private static final String KEY_CURRENT_BLACKLIST = "list"; public static serverObjects respond(final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) { diff --git a/htroot/api/blacklists/get_list_p.java b/htroot/api/blacklists/get_list_p.java index c33bf90dc..076cefc90 100644 --- a/htroot/api/blacklists/get_list_p.java +++ b/htroot/api/blacklists/get_list_p.java @@ -13,6 +13,7 @@ import net.yacy.server.serverSwitch; public class get_list_p { + private static final String KEY_CURRENT_BLACKLIST = "list"; private static final String ITEMS = "items"; private static final String POSTFIX_ITEM = "_item"; private static final String PREFIX_ITEMS = "items_"; @@ -31,7 +32,7 @@ public class get_list_p { final Collection dirlist = FileUtils.getDirListing(ListManager.listsPath, Blacklist.BLACKLIST_FILENAME_FILTER); - final String blackListName = (post == null) ? "" : post.get("name", ""); + final String blackListName = (post == null) ? "" : post.get(KEY_CURRENT_BLACKLIST, ""); int count; if (dirlist != null) { From 1600414450be685a6e2ba7282f93a96055645467 Mon Sep 17 00:00:00 2001 From: reger Date: Fri, 2 May 2014 19:32:09 +0200 Subject: [PATCH 04/10] fix NPE on continuing crawls after YaCy restart (Agent is then nulll) --- source/net/yacy/crawler/HostBalancer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/crawler/HostBalancer.java b/source/net/yacy/crawler/HostBalancer.java index 1ba50ce8c..29aa2923e 100644 --- a/source/net/yacy/crawler/HostBalancer.java +++ b/source/net/yacy/crawler/HostBalancer.java @@ -211,7 +211,8 @@ public class HostBalancer implements Balancer { if (queue == null) { queue = new HostQueue(this.hostsPath, entry.url().getHost(), entry.url().getPort(), this.queues.size() > 100, this.exceed134217727); this.queues.put(hosthash, queue); - robots.ensureExist(entry.url(), profile.getAgent(), true); // concurrently load all robots.txt + // profile might be null when continue crawls after YaCy restart + robots.ensureExist(entry.url(), profile == null ? ClientIdentification.yacyInternetCrawlerAgent : profile.getAgent(), true); // concurrently load all robots.txt } return queue.push(entry, profile, robots); } From b8cee9b7d8444db750e63d6ed470e17d93b01936 Mon Sep 17 00:00:00 2001 From: sixcooler Date: Fri, 2 May 2014 22:55:47 +0200 Subject: [PATCH 05/10] remove tables from tabletracker on close to avoid lots of dead entrys in /PerformanceMemory_p.html --- source/net/yacy/kelondro/table/Table.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/kelondro/table/Table.java b/source/net/yacy/kelondro/table/Table.java index 8630f35d2..2b652ad87 100644 --- a/source/net/yacy/kelondro/table/Table.java +++ b/source/net/yacy/kelondro/table/Table.java @@ -474,12 +474,17 @@ public class Table implements Index, Iterable { @Override public void close() { - if (this.file != null) this.file.close(); + String tablefile = null; + if (this.file != null) { + tablefile = this.file.filename().toString(); + this.file.close(); + } this.file = null; if (this.table != null) this.table.close(); this.table = null; if (this.index != null) this.index.close(); this.index = null; + if (tablefile != null) tableTracker.remove(tablefile); } @Override From 91bd384cf6f346b219d71dd5eb0f3bc7aea1b1e1 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 3 May 2014 21:55:10 +0200 Subject: [PATCH 06/10] fix input-group layout on index.html see bug http://mantis.tokeek.de/view.php?id=391 --- htroot/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htroot/index.html b/htroot/index.html index ad37c37a5..39c309195 100644 --- a/htroot/index.html +++ b/htroot/index.html @@ -53,7 +53,7 @@

#[promoteSearchPageGreeting]#

-