diff --git a/benchmarks/build.gradle b/benchmarks/build.gradle
index bd80deda89c6f..e7ee5a059ab37 100644
--- a/benchmarks/build.gradle
+++ b/benchmarks/build.gradle
@@ -30,7 +30,7 @@ buildscript {
apply plugin: 'elasticsearch.build'
-// order of this seciont matters, see: https://github.com/johnrengelman/shadow/issues/336
+// order of this section matters, see: https://github.com/johnrengelman/shadow/issues/336
apply plugin: 'application' // have the shadow plugin provide the runShadow task
mainClassName = 'org.openjdk.jmh.Main'
apply plugin: 'com.github.johnrengelman.shadow' // build an uberjar with all benchmarks
diff --git a/build.gradle b/build.gradle
index 9bb08cf29dbbc..862943b50f5eb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -326,6 +326,9 @@ gradle.projectsEvaluated {
// :test:framework:test cannot run before and after :server:test
return
}
+ if (tasks.findByPath('test') != null && tasks.findByPath('integTest') != null) {
+ integTest.mustRunAfter test
+ }
configurations.all { Configuration configuration ->
/*
* The featureAwarePlugin configuration has a dependency on x-pack:plugin:core and x-pack:plugin:core has a dependency on the
@@ -575,3 +578,28 @@ gradle.projectsEvaluated {
}
}
}
+
+if (System.properties.get("build.compare") != null) {
+ apply plugin: 'compare-gradle-builds'
+ compareGradleBuilds {
+ ext.referenceProject = System.properties.get("build.compare")
+ doFirst {
+ if (file(referenceProject).exists() == false) {
+ throw new GradleException(
+ "Use git worktree to check out a version to compare against to ../elasticsearch_build_reference"
+ )
+ }
+ }
+ sourceBuild {
+ gradleVersion = "4.7" // does not default to gradle weapper of project dir, but current version
+ projectDir = referenceProject
+ tasks = ["clean", "assemble"]
+ arguments = ["-Dbuild.compare_friendly=true"]
+ }
+ targetBuild {
+ tasks = ["clean", "assemble"]
+ // use -Dorg.gradle.java.home= to alter jdk versions
+ arguments = ["-Dbuild.compare_friendly=true"]
+ }
+ }
+}
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index 5256968b6ca3e..9c139eee2152a 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -106,7 +106,6 @@ GradleVersion logVersion = GradleVersion.current() > GradleVersion.version('4.3'
dependencies {
compileOnly "org.gradle:gradle-logging:${logVersion.getVersion()}"
- compile 'ru.vyarus:gradle-animalsniffer-plugin:1.2.0' // Gradle 2.14 requires a version > 1.0.1
}
/*****************************************************************************
diff --git a/buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/RandomizedTestingPlugin.groovy b/buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/RandomizedTestingPlugin.groovy
index c375f773bf9b5..809aa4fb57ea4 100644
--- a/buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/RandomizedTestingPlugin.groovy
+++ b/buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/RandomizedTestingPlugin.groovy
@@ -1,20 +1,44 @@
package com.carrotsearch.gradle.junit4
import com.carrotsearch.ant.tasks.junit4.JUnit4
-import org.gradle.api.AntBuilder
+import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
+import org.gradle.api.UnknownTaskException
import org.gradle.api.plugins.JavaBasePlugin
import org.gradle.api.tasks.TaskContainer
+import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.testing.Test
+import java.util.concurrent.atomic.AtomicBoolean
+
class RandomizedTestingPlugin implements Plugin {
+ static private AtomicBoolean sanityCheckConfigured = new AtomicBoolean(false)
+
void apply(Project project) {
setupSeed(project)
replaceTestTask(project.tasks)
configureAnt(project.ant)
+ configureSanityCheck(project)
+ }
+
+ private static void configureSanityCheck(Project project) {
+ // Check the task graph to confirm tasks were indeed replaced
+ // https://github.com/elastic/elasticsearch/issues/31324
+ if (sanityCheckConfigured.getAndSet(true) == false) {
+ project.rootProject.getGradle().getTaskGraph().whenReady {
+ List nonConforming = project.getGradle().getTaskGraph().allTasks
+ .findAll { it.name == "test" }
+ .findAll { (it instanceof RandomizedTestingTask) == false}
+ .collect { "${it.path} -> ${it.class}" }
+ if (nonConforming.isEmpty() == false) {
+ throw new GradleException("Found the ${nonConforming.size()} `test` tasks:" +
+ "\n ${nonConforming.join("\n ")}")
+ }
+ }
+ }
}
/**
@@ -45,29 +69,32 @@ class RandomizedTestingPlugin implements Plugin {
}
static void replaceTestTask(TaskContainer tasks) {
- Test oldTestTask = tasks.findByPath('test')
- if (oldTestTask == null) {
+ // Gradle 4.8 introduced lazy tasks, thus we deal both with the `test` task as well as it's provider
+ // https://github.com/gradle/gradle/issues/5730#issuecomment-398822153
+ // since we can't be sure if the task was ever realized, we remove both the provider and the task
+ TaskProvider oldTestProvider
+ try {
+ oldTestProvider = tasks.getByNameLater(Test, 'test')
+ } catch (UnknownTaskException unused) {
// no test task, ok, user will use testing task on their own
return
}
- tasks.remove(oldTestTask)
+ Test oldTestTask = oldTestProvider.get()
- Map properties = [
- name: 'test',
- type: RandomizedTestingTask,
- dependsOn: oldTestTask.dependsOn,
- group: JavaBasePlugin.VERIFICATION_GROUP,
- description: 'Runs unit tests with the randomized testing framework'
- ]
- RandomizedTestingTask newTestTask = tasks.create(properties)
- newTestTask.classpath = oldTestTask.classpath
- newTestTask.testClassesDir = oldTestTask.project.sourceSets.test.output.classesDir
- // since gradle 4.5, tasks immutable dependencies are "hidden" (do not show up in dependsOn)
- // so we must explicitly add a dependency on generating the test classpath
- newTestTask.dependsOn('testClasses')
+ // we still have to use replace here despite the remove above because the task container knows about the provider
+ // by the same name
+ RandomizedTestingTask newTestTask = tasks.replace('test', RandomizedTestingTask)
+ newTestTask.configure{
+ group = JavaBasePlugin.VERIFICATION_GROUP
+ description = 'Runs unit tests with the randomized testing framework'
+ dependsOn oldTestTask.dependsOn, 'testClasses'
+ classpath = oldTestTask.classpath
+ testClassesDir = oldTestTask.project.sourceSets.test.output.classesDir
+ }
// hack so check task depends on custom test
- Task checkTask = tasks.findByPath('check')
+ Task checkTask = tasks.getByName('check')
+ checkTask.dependsOn.remove(oldTestProvider)
checkTask.dependsOn.remove(oldTestTask)
checkTask.dependsOn.add(newTestTask)
}
diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
index eb3cd1dc8c6da..3363c8534a40e 100644
--- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
@@ -348,7 +348,9 @@ class BuildPlugin implements Plugin {
// just a self contained test-fixture configuration, likely transitive and hellacious
return
}
- configuration.resolutionStrategy.failOnVersionConflict()
+ configuration.resolutionStrategy {
+ failOnVersionConflict()
+ }
})
// force all dependencies added directly to compile/testCompile to be non-transitive, except for ES itself
@@ -475,13 +477,17 @@ class BuildPlugin implements Plugin {
}
}
- project.tasks.withType(GenerateMavenPom.class) { GenerateMavenPom t ->
- // place the pom next to the jar it is for
- t.destination = new File(project.buildDir, "distributions/${project.archivesBaseName}-${project.version}.pom")
- // build poms with assemble (if the assemble task exists)
- Task assemble = project.tasks.findByName('assemble')
- if (assemble) {
- assemble.dependsOn(t)
+ // Work around Gradle 4.8 issue until we `enableFeaturePreview('STABLE_PUBLISHING')`
+ // https://github.com/gradle/gradle/issues/5696#issuecomment-396965185
+ project.getGradle().getTaskGraph().whenReady {
+ project.tasks.withType(GenerateMavenPom.class) { GenerateMavenPom t ->
+ // place the pom next to the jar it is for
+ t.destination = new File(project.buildDir, "distributions/${project.archivesBaseName}-${project.version}.pom")
+ // build poms with assemble (if the assemble task exists)
+ Task assemble = project.tasks.findByName('assemble')
+ if (assemble) {
+ assemble.dependsOn(t)
+ }
}
}
}
@@ -625,6 +631,10 @@ class BuildPlugin implements Plugin {
jarTask.manifest.attributes('Change': shortHash)
}
}
+ // Force manifest entries that change by nature to a constant to be able to compare builds more effectively
+ if (System.properties.getProperty("build.compare_friendly", "false") == "true") {
+ jarTask.manifest.getAttributes().clear()
+ }
}
// add license/notice files
project.afterEvaluate {
diff --git a/client/rest/src/main/java/org/elasticsearch/client/RestClient.java b/client/rest/src/main/java/org/elasticsearch/client/RestClient.java
index 77c11db455e47..d07e9e3c1cab7 100644
--- a/client/rest/src/main/java/org/elasticsearch/client/RestClient.java
+++ b/client/rest/src/main/java/org/elasticsearch/client/RestClient.java
@@ -1010,8 +1010,8 @@ public int compareTo(DeadNode rhs) {
}
/**
- * Adapts an Iterator
into an
- * Iterator
.
+ * Adapts an Iterator<DeadNodeAndRevival>
into an
+ * Iterator<Node>
.
*/
private static class DeadNodeIteratorAdapter implements Iterator {
private final Iterator itr;
diff --git a/client/rest/src/test/java/org/elasticsearch/client/RestClientSingleHostTests.java b/client/rest/src/test/java/org/elasticsearch/client/RestClientSingleHostTests.java
index 6b7725666d42d..cb326f4a24c8d 100644
--- a/client/rest/src/test/java/org/elasticsearch/client/RestClientSingleHostTests.java
+++ b/client/rest/src/test/java/org/elasticsearch/client/RestClientSingleHostTests.java
@@ -314,7 +314,7 @@ public void testBody() throws IOException {
}
/**
- * @deprecated will remove method in 7.0 but needs tests until then. Replaced by {@link RequestTests#testAddHeaders()}.
+ * @deprecated will remove method in 7.0 but needs tests until then. Replaced by {@link RequestTests}.
*/
@Deprecated
public void tesPerformRequestOldStyleNullHeaders() throws IOException {
diff --git a/client/rest/src/test/java/org/elasticsearch/client/RestClientTests.java b/client/rest/src/test/java/org/elasticsearch/client/RestClientTests.java
index 030c2fca6272a..30289ec84c9df 100644
--- a/client/rest/src/test/java/org/elasticsearch/client/RestClientTests.java
+++ b/client/rest/src/test/java/org/elasticsearch/client/RestClientTests.java
@@ -141,7 +141,7 @@ public void onFailure(Exception exception) {
}
/**
- * @deprecated will remove method in 7.0 but needs tests until then. Replaced by {@link RequestTests#testAddHeader()}.
+ * @deprecated will remove method in 7.0 but needs tests until then. Replaced by {@link RequestTests}.
*/
@Deprecated
public void testPerformOldStyleAsyncWithNullHeaders() throws Exception {
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index a5fe1cb94b9ee..758de960ec794 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 7962563f742fe..37e3d3699fafc 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
zipStoreBase=GRADLE_USER_HOME
-distributionSha256Sum=203f4537da8b8075e38c036a6d14cb71b1149de5bf0a8f6db32ac2833a1d1294
+zipStorePath=wrapper/dists
+distributionSha256Sum=ce1645ff129d11aad62dab70d63426fdce6cfd646fa309dc5dc5255dd03c7c11
diff --git a/server/src/main/java/org/elasticsearch/search/SearchHit.java b/server/src/main/java/org/elasticsearch/search/SearchHit.java
index 34b48fce941f8..8c688cbf4466a 100644
--- a/server/src/main/java/org/elasticsearch/search/SearchHit.java
+++ b/server/src/main/java/org/elasticsearch/search/SearchHit.java
@@ -497,8 +497,8 @@ public XContentBuilder toInnerXContent(XContentBuilder builder, Params params) t
* This parser outputs a temporary map of the objects needed to create the
* SearchHit instead of directly creating the SearchHit. The reason for this
* is that this way we can reuse the parser when parsing xContent from
- * {@link CompletionSuggestion.Entry.Option} which unfortunately inlines the
- * output of
+ * {@link org.elasticsearch.search.suggest.completion.CompletionSuggestion.Entry.Option} which unfortunately inlines
+ * the output of
* {@link #toInnerXContent(XContentBuilder, org.elasticsearch.common.xcontent.ToXContent.Params)}
* of the included search hit. The output of the map is used to create the
* actual SearchHit instance via {@link #createFromMap(Map)}
diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregator.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregator.java
index 2cde321230ebc..ab529ac033e73 100644
--- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregator.java
+++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregator.java
@@ -200,7 +200,7 @@ public void collect(int doc, long bucket) throws IOException {
/**
* Replay the documents that might contain a top bucket and pass top buckets to
- * the {@link this#deferredCollectors}.
+ * the {@link #deferredCollectors}.
*/
private void runDeferredCollections() throws IOException {
final boolean needsScores = needsScores();
diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeValuesCollectorQueue.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeValuesCollectorQueue.java
index b7b29a8841489..38e22296333ae 100644
--- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeValuesCollectorQueue.java
+++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeValuesCollectorQueue.java
@@ -49,7 +49,7 @@ final class CompositeValuesCollectorQueue implements Releasable {
*
* @param sources The list of {@link CompositeValuesSourceConfig} to build the composite buckets.
* @param size The number of composite buckets to keep.
- * @param afterKey
+ * @param afterKey composite key
*/
CompositeValuesCollectorQueue(BigArrays bigArrays, SingleDimensionValuesSource>[] sources, int size, CompositeKey afterKey) {
this.bigArrays = bigArrays;
diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/SingleDimensionValuesSource.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/SingleDimensionValuesSource.java
index 1718bb4204879..c73820fc32a78 100644
--- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/SingleDimensionValuesSource.java
+++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/SingleDimensionValuesSource.java
@@ -74,7 +74,7 @@ abstract class SingleDimensionValuesSource> implements R
* The current value is filled by a {@link LeafBucketCollector} that visits all the
* values of each document. This method saves this current value in a slot and should only be used
* in the context of a collection.
- * See {@link this#getLeafCollector}.
+ * See {@link #getLeafCollector}.
*/
abstract void copyCurrent(int slot);
@@ -87,7 +87,7 @@ abstract class SingleDimensionValuesSource> implements R
* The current value is filled by a {@link LeafBucketCollector} that visits all the
* values of each document. This method compares this current value with the value present in
* the provided slot and should only be used in the context of a collection.
- * See {@link this#getLeafCollector}.
+ * See {@link #getLeafCollector}.
*/
abstract int compareCurrent(int slot);
@@ -95,7 +95,7 @@ abstract class SingleDimensionValuesSource> implements R
* The current value is filled by a {@link LeafBucketCollector} that visits all the
* values of each document. This method compares this current value with the after value
* set on this source and should only be used in the context of a collection.
- * See {@link this#getLeafCollector}.
+ * See {@link #getLeafCollector}.
*/
abstract int compareCurrentWithAfter();
@@ -120,7 +120,7 @@ T getAfter() {
* Creates a {@link LeafBucketCollector} that extracts all values from a document and invokes
* {@link LeafBucketCollector#collect} on the provided next
collector for each of them.
* The current value of this source is set on each call and can be accessed by next
via
- * the {@link this#copyCurrent(int)} and {@link this#compareCurrent(int)} methods. Note that these methods
+ * the {@link #copyCurrent(int)} and {@link #compareCurrent(int)} methods. Note that these methods
* are only valid when invoked from the {@link LeafBucketCollector} created in this source.
*/
abstract LeafBucketCollector getLeafCollector(LeafReaderContext context, LeafBucketCollector next) throws IOException;
diff --git a/server/src/test/java/org/elasticsearch/common/xcontent/BaseXContentTestCase.java b/server/src/test/java/org/elasticsearch/common/xcontent/BaseXContentTestCase.java
index 0efeae29c3cce..170ea6cf9313d 100644
--- a/server/src/test/java/org/elasticsearch/common/xcontent/BaseXContentTestCase.java
+++ b/server/src/test/java/org/elasticsearch/common/xcontent/BaseXContentTestCase.java
@@ -863,7 +863,7 @@ public void testEnsureNoSelfReferences() throws IOException {
/**
* Test that the same map written multiple times do not trigger the self-reference check in
- * {@link CollectionUtils#ensureNoSelfReferences(Object)}
+ * {@link CollectionUtils#ensureNoSelfReferences(Object, String)} (Object)}
*/
public void testRepeatedMapsAndNoSelfReferences() throws Exception {
Map mapB = singletonMap("b", "B");
diff --git a/server/src/test/java/org/elasticsearch/index/mapper/package-info.java b/server/src/test/java/org/elasticsearch/index/mapper/package-info.java
index 4221a5d4a9668..9a06e56a820a5 100644
--- a/server/src/test/java/org/elasticsearch/index/mapper/package-info.java
+++ b/server/src/test/java/org/elasticsearch/index/mapper/package-info.java
@@ -19,9 +19,7 @@
/**
* Mappings. Mappings define the way that documents should be translated to
- * Lucene indices, for instance how the
- * {@link org.elasticsearch.index.mapper.UidFieldMapper document identifier}
- * should be indexed, whether a string field should be indexed as a
+ * Lucene indices, for instance whether a string field should be indexed as a
* {@link org.elasticsearch.index.mapper.TextFieldMapper text} or
* {@link org.elasticsearch.index.mapper.KeywordFieldMapper keyword} field,
* etc. This parsing is done by the
diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java
index 26e6f4c076553..c40e3b73c6606 100644
--- a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java
+++ b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java
@@ -1345,8 +1345,6 @@ public void testExceptionOnNegativeInterval() {
* https://github.com/elastic/elasticsearch/issues/31392 demonstrates an edge case where a date field mapping with
* "format" = "epoch_millis" can lead for the date histogram aggregation to throw an error if a non-UTC time zone
* with daylight savings time is used. This test was added to check this is working now
- * @throws ExecutionException
- * @throws InterruptedException
*/
public void testRewriteTimeZone_EpochMillisFormat() throws InterruptedException, ExecutionException {
String index = "test31392";
diff --git a/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java b/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java
index 9b21af713701a..5a8e91841c5a7 100644
--- a/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java
+++ b/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java
@@ -275,7 +275,7 @@ protected IndexShard newShard(ShardRouting routing, IndexMetaData indexMetaData,
* @param indexMetaData indexMetaData for the shard, including any mapping
* @param indexSearcherWrapper an optional wrapper to be used during searchers
* @param globalCheckpointSyncer callback for syncing global checkpoints
- * @param indexEventListener
+ * @param indexEventListener index even listener
* @param listeners an optional set of listeners to add to the shard
*/
protected IndexShard newShard(ShardRouting routing, ShardPath shardPath, IndexMetaData indexMetaData,
diff --git a/test/framework/src/main/java/org/elasticsearch/test/AbstractQueryTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/AbstractQueryTestCase.java
index 48301fa5746e2..a2acc5371a19e 100644
--- a/test/framework/src/main/java/org/elasticsearch/test/AbstractQueryTestCase.java
+++ b/test/framework/src/main/java/org/elasticsearch/test/AbstractQueryTestCase.java
@@ -132,7 +132,6 @@ protected String[] shuffleProtectedFields() {
* To find the right position in the root query, we add a marker as `queryName` which
* all query builders support. The added bogus field after that should trigger the exception.
* Queries that allow arbitrary field names at this level need to override this test.
- * @throws IOException
*/
public void testUnknownField() throws IOException {
String marker = "#marker#";
diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java
index 26bec9e62948f..d3916f9dd3ab1 100644
--- a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java
+++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java
@@ -134,8 +134,8 @@ final TimeValue delay(long expirationDate, long now) {
}
/**
- * {@link SchedulerEngine.Schedule#nextScheduledTimeAfter(long, long)} with respect to
- * license expiry date
+ * {@link org.elasticsearch.xpack.core.scheduler.SchedulerEngine.Schedule#nextScheduledTimeAfter(long, long)}
+ * with respect to license expiry date
*/
public final long nextScheduledTimeForExpiry(long expiryDate, long startTime, long time) {
TimeValue delay = delay(expiryDate, time);
@@ -169,4 +169,4 @@ public final String toString() {
orientation.name(), TimeValue.timeValueMillis(min), TimeValue.timeValueMillis(max),
TimeValue.timeValueMillis(frequency));
}
-}
\ No newline at end of file
+}
diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/DerParser.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/DerParser.java
index fedbbb3194724..ae15c70e97b9b 100644
--- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/DerParser.java
+++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/DerParser.java
@@ -87,7 +87,8 @@ Asn1Object readAsn1Object() throws IOException {
* Decode the length of the field. Can only support length
* encoding up to 4 octets.
*
- *
In BER/DER encoding, length can be encoded in 2 forms,
+ * In BER/DER encoding, length can be encoded in 2 forms:
+ *
*
* - Short form. One octet. Bit 8 has value "0" and bits 7-1
* give the length.
@@ -100,7 +101,6 @@ Asn1Object readAsn1Object() throws IOException {
*
*
* @return The length as integer
- * @throws IOException
*/
private int getLength() throws IOException {
@@ -145,7 +145,8 @@ static class Asn1Object {
* Construct a ASN.1 TLV. The TLV could be either a
* constructed or primitive entity.
*
- *
The first byte in DER encoding is made of following fields,
+ * The first byte in DER encoding is made of following fields:
+ *
*
* -------------------------------------------------
* |Bit 8|Bit 7|Bit 6|Bit 5|Bit 4|Bit 3|Bit 2|Bit 1|
@@ -192,7 +193,6 @@ public boolean isConstructed() {
* For constructed field, return a parser for its content.
*
* @return A parser for the construct.
- * @throws IOException
*/
public DerParser getParser() throws IOException {
if (!isConstructed())
@@ -205,7 +205,6 @@ public DerParser getParser() throws IOException {
* Get the value as integer
*
* @return BigInteger
- * @throws IOException
*/
public BigInteger getInteger() throws IOException {
if (type != DerParser.INTEGER)
diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PemUtils.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PemUtils.java
index 9ff44d0135ffa..d959c017e0a35 100644
--- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PemUtils.java
+++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/PemUtils.java
@@ -108,7 +108,6 @@ public static PrivateKey readPrivateKey(Path keyPath, Supplier passwordS
* Removes the EC Headers that OpenSSL adds to EC private keys as the information in them
* is redundant
*
- * @param bReader
* @throws IOException if the EC Parameter footer is missing
*/
private static BufferedReader removeECHeaders(BufferedReader bReader) throws IOException {
@@ -133,7 +132,6 @@ private static BufferedReader removeECHeaders(BufferedReader bReader) throws IOE
* Removes the DSA Params Headers that OpenSSL adds to DSA private keys as the information in them
* is redundant
*
- * @param bReader
* @throws IOException if the EC Parameter footer is missing
*/
private static BufferedReader removeDsaHeaders(BufferedReader bReader) throws IOException {
diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManager.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManager.java
index c49692dda98c1..8a82694785a28 100644
--- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManager.java
+++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/RestrictedTrustManager.java
@@ -132,7 +132,7 @@ private Set readCommonNames(X509Certificate certificate) throws Certific
* Decodes the otherName CN from the certificate
*
* @param value The DER Encoded Subject Alternative Name
- * @param certificate
+ * @param certificate The certificate
* @return the CN or null if it could not be parsed
*/
private String decodeDerValue(byte[] value, X509Certificate certificate) {
diff --git a/x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/job/RollupIndexer.java b/x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/job/RollupIndexer.java
index 5abd701ce4b2e..a07f1e7d32e7c 100644
--- a/x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/job/RollupIndexer.java
+++ b/x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/job/RollupIndexer.java
@@ -405,7 +405,8 @@ private CompositeAggregationBuilder createCompositeBuilder(RollupJobConfig confi
}
/**
- * Creates the range query that limits the search to documents that appear before the maximum allowed time (see {@link this#maxBoundary}
+ * Creates the range query that limits the search to documents that appear before the maximum allowed time
+ * (see {@link #maxBoundary}
* and on or after the last processed time.
* @param position The current position of the pagination
* @return The range query to execute
diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/RestorableContextClassLoader.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/RestorableContextClassLoader.java
index f2e36ebf98273..95c68eab9c28a 100644
--- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/RestorableContextClassLoader.java
+++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/RestorableContextClassLoader.java
@@ -12,7 +12,7 @@
import org.elasticsearch.SpecialPermission;
/**
- * A try-with-resource compatible object for configuring a thread {@link Thread#contextClassLoader}.
+ * A try-with-resource compatible object for configuring a thread {@link Thread#getContextClassLoader()}.
* On construction this class will set the current (or provided) thread's context class loader.
* On {@link #close()}, it restores the previous value of the class loader.
*/
diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java
index 51a6d8732a5b3..adaba34a73aa3 100644
--- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java
+++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java
@@ -64,7 +64,6 @@ public static void restoreLocale() throws Exception {
* Generates signed certificate and associates with generated key pair.
* @see #readRandomKeyPair(String)
* @return X509Certificate a signed certificate, it's PrivateKey {@link Tuple}
- * @throws Exception
*/
protected static Tuple readRandomKeyPair() throws Exception {
return readRandomKeyPair("RSA");
@@ -73,9 +72,7 @@ protected static Tuple readRandomKeyPair() throws E
/**
* Reads a key pair and associated certificate for given algorithm and key length
* For testing, for "EC" algorithm 256 key size is used, others use 2048 as default.
- * @param algorithm
- * @return X509Certificate a signed certificate, it's PrivateKey {@link Tuple}
- * @throws Exception
+ * @return X509Certificate a signed certificate, it's PrivateKey
*/
protected static Tuple readRandomKeyPair(String algorithm) throws Exception {
int keySize;
diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/predicate/Range.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/predicate/Range.java
index 54d541ab406b7..c17e9634492a1 100644
--- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/predicate/Range.java
+++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/predicate/Range.java
@@ -87,7 +87,7 @@ public Object fold() {
}
/**
- * Check whether the boundaries are invalid ( upper < lower) or not.
+ * Check whether the boundaries are invalid ( upper < lower) or not.
* If they do, the value does not have to be evaluate.
*/
private boolean areBoundariesInvalid() {
@@ -139,4 +139,4 @@ public String toString() {
sb.append(upper);
return sb.toString();
}
-}
\ No newline at end of file
+}
diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/IndexAuditUpgradeIT.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/IndexAuditUpgradeIT.java
index 7c81a7141a991..92a8c3d2f830f 100644
--- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/IndexAuditUpgradeIT.java
+++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/IndexAuditUpgradeIT.java
@@ -87,7 +87,6 @@ private void assertNumUniqueNodeNameBuckets(int numBuckets) throws Exception {
/**
* Has the master been upgraded to the new version?
- * @throws IOException
*/
private boolean masterIsNewVersion() throws IOException {
Map, ?> map = entityAsMap(client().performRequest("GET", "/_nodes/_master"));