Skip to content

Commit

Permalink
fix for host compare in case that the host is null. This happens when
Browse files Browse the repository at this point in the history
doing a search in the intranet for file resources (they don't have a
host).
  • Loading branch information
Orbiter committed Jun 10, 2013
1 parent 5132bf7 commit 8e965ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/net/yacy/search/Switchboard.java
Expand Up @@ -3397,7 +3397,7 @@ public void run() {
Collection<DigestURI> urls = new ArrayList<DigestURI>();
while (i.hasNext()) {
url = i.next();
boolean islocal = url.getHost().contentEquals(startUrl.getHost());
boolean islocal = (url.getHost() == null && startUrl.getHost() == null) || (url.getHost() != null && startUrl.getHost() != null && url.getHost().contentEquals(startUrl.getHost()));
// add all external links or links to different page to crawler
if ( !islocal ) {// || (!startUrl.getPath().endsWith(url.getPath()))) {
urls.add(url);
Expand Down

0 comments on commit 8e965ff

Please sign in to comment.