Apache Nutch is an extensible and scalable web crawler
NUTCH-2812 Methods returning array may expose internal representation
Sebastian Nageld6f55b8ea6f5
diff --git a/src/java/org/apache/nutch/fetcher/FetchNode.java b/src/java/org/apache/nutch/fetcher/FetchNode.javaindex eb659f13f..837c6515d 100644--- a/src/java/org/apache/nutch/fetcher/FetchNode.java+++ b/src/java/org/apache/nutch/fetcher/FetchNode.java@@ -16,6 +16,8 @@*/package org.apache.nutch.fetcher;+import java.net.MalformedURLException;+import org.apache.hadoop.io.Text;import org.apache.nutch.parse.Outlink;@@ -37,7 +39,11 @@ public class FetchNode {for (int i = copyOutlinks.length-1; i>=0; i--) {Outlink o = outlinks[i];if (o != null) {- copyOutlinks[i] = new Outlink(o.getToUrl(), o.getAnchor());+ try {+ copyOutlinks[i] = new Outlink(o.getToUrl(), o.getAnchor());+ } catch (MalformedURLException e) {+ // ignore+ }}}return outlinks;