Skip to content

Apache Lucene open-source search software

LUCENE-9126: enable javadoc linting bypassing java bug. Corrected syntax errors so that validations passes but had to disable ALL html checks (tons of them).

Dawid Weiss7dc4df95247a
diff --git a/lucene/analysis/icu/src/java/overview.html b/lucene/analysis/icu/src/java/overview.html
index 3af02470904..fa61e7c1c6a 100644
--- a/lucene/analysis/icu/src/java/overview.html
+++ b/lucene/analysis/icu/src/java/overview.html
@@ -148,7 +148,7 @@ algorithm.
String[] tracer = new String[] { "A", "B", "C", "D", "E" };
String[] data = new String[] { "HAT", "HUT", "H\u00C5T", "H\u00D8T", "HOT" };
String[] sortedTracerOrder = new String[] { "A", "E", "B", "D", "C" };
- for (int i = 0 ; i < data.length ; ++i) {
+ for (int i = 0 ; i &lt; data.length ; ++i) {
Document doc = new Document();
doc.add(new Field("tracer", tracer[i], Field.Store.YES, Field.Index.NO));
doc.add(new Field("contents", data[i], Field.Store.NO, Field.Index.ANALYZED));
@@ -160,7 +160,7 @@ algorithm.
sort.setSort(new SortField("contents", SortField.STRING));
Query query = new MatchAllDocsQuery();
ScoreDoc[] result = searcher.search(query, null, 1000, sort).scoreDocs;
- for (int i = 0 ; i < result.length ; ++i) {
+ for (int i = 0 ; i &lt; result.length ; ++i) {
Document doc = searcher.doc(result[i].doc);
assertEquals(sortedTracerOrder[i], doc.getValues("tracer")[0]);
}
diff --git a/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/util/DictionaryBuilder.java b/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/util/DictionaryBuilder.java
index 5004b62b3ca..58ab4e975e5 100644
--- a/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/util/DictionaryBuilder.java
+++ b/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/util/DictionaryBuilder.java
@@ -33,7 +33,7 @@ import java.util.Locale;
* files, roughly following the conventions of IPADIC. JapaneseTokenizer uses dictionaries built
* with this tool. Note that the input files required by this build generally must be generated from
* a corpus of real text using tools that are not part of Lucene. </p>
- * @lucene.experimenal
+ * @lucene.experimental
*/
public class DictionaryBuilder {
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 4d4e555a7e7..31deac4a22a 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -202,7 +202,7 @@
<property name="javadoc.noindex" value="true"/>
<!---TODO: Fix accessibility (order of H1/H2/H3 headings), see https://issues.apache.org/jira/browse/LUCENE-8729 -->
- <property name="javadoc.doclint.args" value="-Xdoclint:all -Xdoclint:-missing -Xdoclint:-accessibility"/>
+ <property name="javadoc.doclint.args" value="-Xdoclint:all,-missing,-accessibility,-html"/>
<!---proc:none was added because of LOG4J2-1925 / JDK-8186647 -->
<property name="javac.doclint.args" value="-Xdoclint:all/protected -Xdoclint:-missing -Xdoclint:-accessibility -proc:none"/>
diff --git a/lucene/core/src/java/overview.html b/lucene/core/src/java/overview.html
index b4f5b816a70..da8f8ea4300 100644
--- a/lucene/core/src/java/overview.html
+++ b/lucene/core/src/java/overview.html
@@ -49,7 +49,7 @@ to check if the results are what we expect):</p>
ScoreDoc[] hits = isearcher.search(query, 10).scoreDocs;
assertEquals(1, hits.length);
// Iterate through the results:
- for (int i = 0; i < hits.length; i++) {
+ for (int i = 0; i &lt; hits.length; i++) {
Document hitDoc = isearcher.doc(hits[i].doc);
assertEquals("This is the text to be indexed.", hitDoc.get("fieldname"));
}
@@ -147,11 +147,11 @@ index for all the files contained in a directory.</li>
queries and searches an index.</li>
</ul>
To demonstrate these, try something like:
-<blockquote><tt>> <b>java -cp lucene-core.jar:lucene-demo.jar:lucene-analyzers-common.jar org.apache.lucene.demo.IndexFiles -index index -docs rec.food.recipes/soups</b></tt>
+<blockquote><tt>&gt; <b>java -cp lucene-core.jar:lucene-demo.jar:lucene-analyzers-common.jar org.apache.lucene.demo.IndexFiles -index index -docs rec.food.recipes/soups</b></tt>
<br><tt>adding rec.food.recipes/soups/abalone-chowder</tt>
<br><tt>&nbsp; </tt>[ ... ]
-<p><tt>> <b>java -cp lucene-core.jar:lucene-demo.jar:lucene-queryparser.jar:lucene-analyzers-common.jar org.apache.lucene.demo.SearchFiles</b></tt>
+<p><tt>&gt; <b>java -cp lucene-core.jar:lucene-demo.jar:lucene-queryparser.jar:lucene-analyzers-common.jar org.apache.lucene.demo.SearchFiles</b></tt>
<br><tt>Query: <b>chowder</b></tt>
<br><tt>Searching for: chowder</tt>
<br><tt>34 total matching documents</tt>
diff --git a/lucene/misc/src/java/overview.html b/lucene/misc/src/java/overview.html
index 1423edd618d..8962cfcb8e2 100644
--- a/lucene/misc/src/java/overview.html
+++ b/lucene/misc/src/java/overview.html
@@ -49,7 +49,7 @@ Steps to build:
<ul>
<li> <tt>cd lucene/misc/</tt>
- <li> To compile NativePosixUtil.cpp -> libNativePosixUtil.so, run<tt> ant build-native-unix</tt>.
+ <li> To compile NativePosixUtil.cpp -&gt; libNativePosixUtil.so, run<tt> ant build-native-unix</tt>.
<li><tt>libNativePosixUtil.so</tt> will be located in the <tt>lucene/build/native/</tt> folder