mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
fixed double/missing null check for LURLs
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2520 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
406e170e25
commit
c543028dd4
|
@ -137,11 +137,9 @@ public class Bookmarks {
|
|||
plasmaCrawlLURL.Entry urlentry = switchboard.urlPool.loadedURL.load(urlHash, null);
|
||||
if (urlentry != null) {
|
||||
prop.put("mode_edit", 0); // create mode
|
||||
if (urlentry != null) {
|
||||
prop.put("mode_title", urlentry.descr());
|
||||
prop.put("mode_description", urlentry.descr());
|
||||
prop.put("mode_url", urlentry.url());
|
||||
}
|
||||
prop.put("mode_title", urlentry.descr());
|
||||
prop.put("mode_description", urlentry.descr());
|
||||
prop.put("mode_url", urlentry.url());
|
||||
prop.put("mode_tags", "");
|
||||
prop.put("mode_public", 0);
|
||||
}
|
||||
|
|
|
@ -215,15 +215,11 @@ public class IndexControl_p {
|
|||
if (entry == null) {
|
||||
prop.put("result", "No Entry for URL hash " + urlhash + "; nothing deleted.");
|
||||
} else {
|
||||
if (entry != null) {
|
||||
URL url = entry.url();
|
||||
urlstring = url.toNormalform();
|
||||
prop.put("urlstring", "");
|
||||
switchboard.urlPool.loadedURL.remove(urlhash);
|
||||
prop.put("result", "Removed URL " + urlstring);
|
||||
} else {
|
||||
prop.put("result", "No Entry for URL hash " + urlhash + "; nothing deleted.");
|
||||
}
|
||||
URL url = entry.url();
|
||||
urlstring = url.toNormalform();
|
||||
prop.put("urlstring", "");
|
||||
switchboard.urlPool.loadedURL.remove(urlhash);
|
||||
prop.put("result", "Removed URL " + urlstring);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,7 +262,7 @@ public class IndexControl_p {
|
|||
while (urlIter.hasNext()) {
|
||||
iEntry = (indexEntry) urlIter.next();
|
||||
lurl = switchboard.urlPool.loadedURL.load(iEntry.urlHash(), null);
|
||||
if (lurl.toString() == null) {
|
||||
if (lurl == null) {
|
||||
unknownURLEntries.add(iEntry.urlHash());
|
||||
urlIter.remove();
|
||||
} else {
|
||||
|
@ -329,14 +325,10 @@ public class IndexControl_p {
|
|||
if (entry == null) {
|
||||
prop.put("result", "No Entry for URL hash " + urlhash);
|
||||
} else {
|
||||
if (entry != null) {
|
||||
URL url = entry.url();
|
||||
urlstring = url.toString();
|
||||
prop.put("urlstring", urlstring);
|
||||
prop.put("result", genUrlProfile(switchboard, entry, urlhash));
|
||||
} else {
|
||||
prop.put("result", "No Entry for URL hash " + urlhash);
|
||||
}
|
||||
URL url = entry.url();
|
||||
urlstring = url.toString();
|
||||
prop.put("urlstring", urlstring);
|
||||
prop.put("result", genUrlProfile(switchboard, entry, urlhash));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -253,14 +253,9 @@ public final class crawlOrder {
|
|||
response = "rejected";
|
||||
lurl = "";
|
||||
} else {
|
||||
if (entry != null) {
|
||||
response = "double";
|
||||
switchboard.urlPool.loadedURL.notifyGCrawl(entry.hash(), iam, youare);
|
||||
lurl = crypt.simpleEncode(entry.toString());
|
||||
} else {
|
||||
response = "rejected";
|
||||
lurl = "";
|
||||
}
|
||||
response = "double";
|
||||
switchboard.urlPool.loadedURL.notifyGCrawl(entry.hash(), iam, youare);
|
||||
lurl = crypt.simpleEncode(entry.toString());
|
||||
}
|
||||
} else {
|
||||
response = "rejected";
|
||||
|
|
Loading…
Reference in New Issue
Block a user