Apache Nutch is an extensible and scalable web crawler
NUTCH-2857 Upgrade from JDK1.8 --> JDK11 (#573)
Lewis John McGibbneyb91fae53e7de
diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.ymlindex 7e748409b..e3ed11c86 100644--- a/.github/workflows/master-build.yml+++ b/.github/workflows/master-build.yml@@ -29,7 +29,7 @@ jobs:runs-on: ubuntu-lateststrategy:matrix:- java: [ '1.8' ]+ java: [ '11' ]steps:- uses: actions/checkout@v2diff --git a/default.properties b/default.propertiesindex f25090410..cf82c8410 100644--- a/default.properties+++ b/default.properties@@ -43,7 +43,7 @@ test.junit.output.format = plain# Proxy Host and Port to use for building JavaDocjavadoc.proxy.host=-J-DproxyHost=javadoc.proxy.port=-J-DproxyPort=-javadoc.link.java=https://docs.oracle.com/javase/8/docs/api/+javadoc.link.java=https://docs.oracle.com/en/java/javase/11/docs/api/javadoc.link.hadoop=https://hadoop.apache.org/docs/r3.1.3/api/#javadoc.link.lucene.core=https://lucene.apache.org/core/8_4_1/core/#javadoc.link.lucene.analyzers-common=https://lucene.apache.org/core/8_4_1/analyzers-common/@@ -57,7 +57,7 @@ bin.dist.version.dir=${dist.dir}/${final.name}-binjavac.debug=onjavac.optimize=onjavac.deprecation=on-javac.version=1.8+javac.version=11runtime.dir=./runtimeruntime.deploy=${runtime.dir}/deploydiff --git a/ivy/mvn.template b/ivy/mvn.templateindex edfb550b0..b38b37f6d 100644--- a/ivy/mvn.template+++ b/ivy/mvn.template@@ -130,8 +130,8 @@<artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration>- <source>1.8</source>- <target>1.8</target>+ <source>11</source>+ <target>11</target></configuration></plugin></plugins>diff --git a/src/java/org/apache/nutch/indexer/IndexWriterParams.java b/src/java/org/apache/nutch/indexer/IndexWriterParams.javaindex e7b3152a9..52cc4f9c9 100644--- a/src/java/org/apache/nutch/indexer/IndexWriterParams.java+++ b/src/java/org/apache/nutch/indexer/IndexWriterParams.java@@ -24,10 +24,10 @@ import java.util.Map;public class IndexWriterParams extends HashMap<String, String> {/**- * Constructs a new <tt>HashMap</tt> with the same mappings as the- * specified <tt>Map</tt>. The <tt>HashMap</tt> is created with+ * Constructs a new <code>HashMap</code> with the same mappings as the+ * specified <code>Map</code>. The <code>HashMap</code> is created with* default load factor (0.75) and an initial capacity sufficient to- * hold the mappings in the specified <tt>Map</tt>.+ * hold the mappings in the specified <code>Map</code>.** @param m the map whose mappings are to be placed in this map* @throws NullPointerException if the specified map is nulldiff --git a/src/java/org/apache/nutch/metadata/MetaWrapper.java b/src/java/org/apache/nutch/metadata/MetaWrapper.javaindex a58253c01..254773493 100644--- a/src/java/org/apache/nutch/metadata/MetaWrapper.java+++ b/src/java/org/apache/nutch/metadata/MetaWrapper.java@@ -26,7 +26,7 @@ import org.apache.nutch.crawl.NutchWritable;/*** This is a simple decorator that adds metadata to any Writable-s that can be- * serialized by <tt>NutchWritable</tt>. This is useful when data needs to be+ * serialized by {@link NutchWritable}. This is useful when data needs to be* temporarily enriched during processing, but this temporary metadata doesn't* need to be permanently stored after the job is done.*diff --git a/src/java/org/apache/nutch/net/URLNormalizers.java b/src/java/org/apache/nutch/net/URLNormalizers.javaindex 4ec904dba..bf947f7f6 100644--- a/src/java/org/apache/nutch/net/URLNormalizers.java+++ b/src/java/org/apache/nutch/net/URLNormalizers.java@@ -42,7 +42,7 @@ import org.apache.nutch.util.ObjectCache;* This class uses a "chained filter" pattern to run defined normalizers.* Different lists of normalizers may be defined for different "scopes", or* contexts where they are used (note however that they need to be activated- * first through <tt>plugin.include</tt> property).+ * first through <code>plugin.include</code> property).** <p>* There is one global scope defined by default, which consists of all active@@ -82,7 +82,7 @@ import org.apache.nutch.util.ObjectCache;* executed at the beginning. By default this loop is executed just once - if* you want to ensure that all possible combinations have been applied you may* want to run this loop up to the number of activated normalizers. This loop- * count can be configured through <tt>urlnormalizer.loop.count</tt> property.+ * count can be configured through <code>urlnormalizer.loop.count</code> property.* As soon as the url is unchanged the loop will stop and return the result.* </p>*diff --git a/src/java/org/apache/nutch/parse/ParserChecker.java b/src/java/org/apache/nutch/parse/ParserChecker.javaindex 97dcd3904..7b0e76aab 100644--- a/src/java/org/apache/nutch/parse/ParserChecker.java+++ b/src/java/org/apache/nutch/parse/ParserChecker.java@@ -43,22 +43,22 @@ import org.slf4j.LoggerFactory;* to aid debugging. The tool enables us to retrieve the following data from any* url:* <ol>- * <li><tt>contentType</tt>: The URL {@link org.apache.nutch.protocol.Content}+ * <li><code>contentType</code>: The URL {@link org.apache.nutch.protocol.Content}* type.</li>- * <li><tt>signature</tt>: Digest is used to identify pages (like unique ID) and+ * <li><code>signature</code>: Digest is used to identify pages (like unique ID) and* is used to remove duplicates during the dedup procedure. It is calculated* using {@link org.apache.nutch.crawl.MD5Signature} or* {@link org.apache.nutch.crawl.TextProfileSignature}.</li>- * <li><tt>Version</tt>: From {@link org.apache.nutch.parse.ParseData}.</li>- * <li><tt>Status</tt>: From {@link org.apache.nutch.parse.ParseData}.</li>- * <li><tt>Title</tt>: of the URL</li>- * <li><tt>Outlinks</tt>: associated with the URL</li>- * <li><tt>Content Metadata</tt>: such as <i>X-AspNet-Version</i>, <i>Date</i>,+ * <li><code>Version</code>: From {@link org.apache.nutch.parse.ParseData}.</li>+ * <li><code>Status</code>: From {@link org.apache.nutch.parse.ParseData}.</li>+ * <li><code>Title</code>: of the URL</li>+ * <li><code>Outlinks</code>: associated with the URL</li>+ * <li><code>Content Metadata</code>: such as <i>X-AspNet-Version</i>, <i>Date</i>,* <i>Content-length</i>, <i>servedBy</i>, <i>Content-Type</i>,* <i>Cache-Control</i>, etc.</li>- * <li><tt>Parse Metadata</tt>: such as <i>CharEncodingForConversion</i>,+ * <li><code>Parse Metadata</code>: such as <i>CharEncodingForConversion</i>,* <i>OriginalCharEncoding</i>, <i>language</i>, etc.</li>- * <li><tt>ParseText</tt>: The page parse text which varies in length depdnecing+ * <li><code>ParseText</code>: The page parse text which varies in length depdnecing* on <code>content.length</code> configuration.</li>* </ol>*diff --git a/src/java/org/apache/nutch/segment/SegmentMergeFilter.java b/src/java/org/apache/nutch/segment/SegmentMergeFilter.javaindex 0e1d57900..c0c72c71b 100644--- a/src/java/org/apache/nutch/segment/SegmentMergeFilter.java+++ b/src/java/org/apache/nutch/segment/SegmentMergeFilter.java@@ -45,7 +45,7 @@ public interface SegmentMergeFilter {* @param parseData directory and data produced by the parse phase* @param parseText directory and data produced by the parse phase* @param linked all LINKED values from the latest segment- * @return <tt>true</tt> values for this <tt>key</tt> (URL) should be merged+ * @return <code>true</code> values for this <code>key</code> (URL) should be merged* into the new segment.*/public boolean filter(Text key, CrawlDatum generateData,diff --git a/src/java/org/apache/nutch/segment/SegmentMergeFilters.java b/src/java/org/apache/nutch/segment/SegmentMergeFilters.javaindex 81cf323b1..812622174 100644--- a/src/java/org/apache/nutch/segment/SegmentMergeFilters.java+++ b/src/java/org/apache/nutch/segment/SegmentMergeFilters.java@@ -36,7 +36,7 @@ import org.apache.nutch.protocol.Content;/*** This class wraps all {@link SegmentMergeFilter} extensions in a single object* so it is easier to operate on them. If any of extensions returns- * <tt>false</tt> this one will return <tt>false</tt> as well.+ * <code>false</code> this one will return <code>false</code> as well.**/public class SegmentMergeFilters {@@ -71,7 +71,7 @@ public class SegmentMergeFilters {* @param parseData directory and data produced by the parse phase* @param parseText directory and data produced by the parse phase* @param linked all LINKED values from the latest segment- * @return <tt>true</tt> values for this <tt>key</tt> (URL) should be merged+ * @return <code>true</code> values for this <code>key</code> (URL) should be merged* into the new segment.*/public boolean filter(Text key, CrawlDatum generateData,diff --git a/src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java b/src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.javaindex 7ccc423cc..885944e5d 100644--- a/src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java+++ b/src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java@@ -52,7 +52,7 @@ import org.xml.sax.InputSource;* which is useful for stripping session IDs from URLs.** <p>- * This class uses the <tt>urlnormalizer.regex.file</tt> property. It should be+ * This class uses the <code>urlnormalizer.regex.file</code> property. It should be* set to the file name of an xml file which should contain the patterns and* substitutions to be done on encountered URLs.* </p>