diff --git a/build.gradle b/build.gradle index 43dc65e155fab..b11617d981fcd 100644 --- a/build.gradle +++ b/build.gradle @@ -315,6 +315,10 @@ allprojects { // see https://discuss.gradle.org/t/add-custom-javadoc-option-that-does-not-take-an-argument/5959 javadoc.options.encoding = 'UTF8' javadoc.options.addStringOption('Xdoclint:all,-missing', '-quiet') + boolean failOnJavadocWarning = project.ext.has('failOnJavadocWarning') ? project.ext.get('failOnJavadocWarning') : true + if (failOnJavadocWarning) { + javadoc.options.addStringOption('Xwerror', '-quiet') + } javadoc.options.tags = ["opensearch.internal", "opensearch.api", "opensearch.experimental"] } diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index 4ecf341e6e304..590ac82bd4162 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -40,6 +40,11 @@ opensearchplugin { classname 'org.opensearch.painless.PainlessPlugin' } +ext { + // Do not fail on `javadoc` warning (ANTLR generated code) + failOnJavadocWarning = false +} + testClusters.all { module ':modules:mapper-extras' systemProperty 'opensearch.scripting.update.ctx_in_params', 'false' diff --git a/server/src/main/java/org/opensearch/index/fielddata/ScriptDocValues.java b/server/src/main/java/org/opensearch/index/fielddata/ScriptDocValues.java index 0b5ace1657fd3..e3ac5a8aee0c2 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/ScriptDocValues.java +++ b/server/src/main/java/org/opensearch/index/fielddata/ScriptDocValues.java @@ -123,7 +123,7 @@ public void setNextDocId(int docId) throws IOException { } /** - * Set the {@link #size()} and ensure that the {@link #values} array can + * Set the {@link #size()} and ensure that the internal values array can * store at least that many entries. */ protected void resize(int newSize) { @@ -515,7 +515,7 @@ public void setNextDocId(int docId) throws IOException { } /** - * Set the {@link #size()} and ensure that the {@link #values} array can + * Set the {@link #size()} and ensure that the internal values array can * store at least that many entries. */ protected void resize(int newSize) { diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java index b9eb9cd2a57a3..47f344773d111 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -1667,9 +1667,9 @@ static Engine.Searcher wrapSearcher( * Used with segment replication during relocation handoff, this method updates current read only engine to global * checkpoint followed by changing to writeable engine * - * @throws IOException - * @throws InterruptedException - * @throws TimeoutException + * @throws IOException if communication failed + * @throws InterruptedException if calling thread is interrupted + * @throws TimeoutException if timed out waiting for in-flight operations to finish * * @opensearch.internal */