From 060e00aeba7d5b70f36be054d97eb93f560d24cd Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Fri, 18 May 2018 09:16:09 +0300 Subject: [PATCH 01/23] Move to Gradle 4.8 RC1 --- gradle/wrapper/gradle-wrapper.jar | Bin 54329 -> 54413 bytes gradle/wrapper/gradle-wrapper.properties | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a5fe1cb94b9ee5ce57e6113458225bcba12d83e3..91ca28c8b802289c3a438766657a5e98f20eff03 100644 GIT binary patch delta 7397 zcmY+JWmFVEyv3IV=@jV(>F!z@2@w$KmS%wkX_s20k!ES6J0t|8k&cC>kxuDOX?#B4 zJ1^$b@7_Ce=FH5Ong2AGqQ;b=#*3n*Sr_*uNE)JFxShG70OBcY>n*sk%p!xW6fgjQ zBRDM&7tC8npX5nn+ckXXnY>Y{cCI=kWN6%){zd#LVaB+K7p4${BAbJYEe{+=^g7o2 z__WmJ>zD&~hr|ATWSj$-S%Gb#e5Sm?p<;&4WZ3+X?4hqH!1wr#Ksqkbh>`eCw*T+> zdr4oIU5+5{&z^U6jHJ3~r{01DW22Zt>hf#9IBE|C7t*QCvC|Q0*{0hOPzIC%= zQ~86R@Nx1*(OD6DAAhX2>zDp?^3l(m3<+(5VctWD-UDZ}ZTc@y9Q*FiP_%Axap|1< z!cW)r{Ltu)8r7|NIH$V8}$P&4CK|U7pkjTPh7{DVY2-*0E<=ux<`7XB~s7k>OnJOT0zW_N)}E z+g1`<4W42#8BC;7L%Z2UF=_s>L?z*|w|n&6dGuDALeY@xl%#dE8tsB$VoFb#-B1$; z?l2EYZZ3fYzSNvjt^GTfLZ5Ck_rS zb=+}lXfza2Kg4%j^mWuVtR-m0-PGJ-<{|A1_w>f(M2+>%gZeS4Q=RPJtsOa~wu^M{;luOUT~@`NyIiV`8gW1%!)1FBg69GkONB9Yy5ArTOk<9HJqOLnS; z_ha%bf9_T|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{EKCR=@KCA-J07r9jtCPY;sErsxLYFqSy zpRa`6c&VNj7E~Q>XAh<9oheJb>bN1#aCs7v_)4pLc*@?EQ&+qPN2_w=%C)pPU z`qG1bHY0&$@%oV_A8o70y;+Pe*M6Yqz<13#?yku5Wb}o`ow?(564Msn(j|Voblb)y zb|hBE{poM|>~Gfe*mNKoObWrCHJ1s*+--P2(MHqnkF%#k*V`bkd@4IA8qKtXEsQhun;iPD7L>yhJ6ke)XRkB}778=2oy^9^2e3 zJ#NlJ8DE3^`Vs~_&n-%CH4QYuQvMRM?o@?_ukh<3%KLsnYE>|n$%zJ-W^_wDDeco>i?Zrz?xQ(wY&{+Pf&Ui42owzveuMd`stT-H7EU&5ERaH&#e z0(CveCSFA9SD?iGTpHL|@f>w9Q3-0_h4h zpYBigduDhd=e4<>eUq|S} z{#`y z02v-yBI&;8gyghq(jl-vqS3YSvt_En#Tw`XN)VGp~NL=Whi+2*1ihlybmgwR9gCQFuzY zZz!)yx6?V~`Y_65uc;|1I~r6m`c?iMOi{S-7o1FWHLs%9x?(+c$M^k$ zC7NN3nW?iyc^q7-AWup4dqAAGsw(mBUg2A275Mznkl@sm-k@l@@U22}sGpjs>j z&=CJu+sS)Gp5p&Taevde{|<6K=*BQ1^khT;5UB7EMZfU_aFqUG!ADGJ`nUH0vXB4d z={GTe9Oxg8gD9bNg0+@7!_9at58^)#JEuiP)+JFI Date: Fri, 18 May 2018 09:16:27 +0300 Subject: [PATCH 02/23] Use latest version of plugin The current does not work with Gradle 4.8 RC1 --- buildSrc/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 5256968b6ca3e..50a6f07077845 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -106,7 +106,7 @@ 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 + compile 'ru.vyarus:gradle-animalsniffer-plugin:1.4.3' } /***************************************************************************** From 1011582f712f42bf2b85e2065df7ebc68673822c Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Mon, 11 Jun 2018 12:25:25 +0300 Subject: [PATCH 03/23] Switch to Gradle GA --- gradle/wrapper/gradle-wrapper.jar | Bin 54413 -> 54418 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 91ca28c8b802289c3a438766657a5e98f20eff03..f5a7e5e1fcf56305fbcbf1dda36c9786b8a2ec3d 100644 GIT binary patch delta 95 zcmeBO$vkN#^8|Ai&(Gi7Ct63aMSdvySj0H_V5;=SErEw5Heb;7x@OA45a7+u!MkbV pc?kvv1~DL>Jn^v1WRt_%V11jD58o5ugiBBMx?;;Fdl;yS0RR#VB98z7 delta 90 zcmbQVlDT&!^8|C287a$-PPC3-oB6ruV-e%zgQ?ORw*(#%HfCoC@Mh Date: Mon, 11 Jun 2018 16:03:33 +0300 Subject: [PATCH 04/23] Add and configure build compare plugin --- build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.gradle b/build.gradle index 05ad5479e8dea..b774e265655b5 100644 --- a/build.gradle +++ b/build.gradle @@ -547,3 +547,12 @@ gradle.projectsEvaluated { } } } + +apply plugin: 'compare-gradle-builds' + +compareGradleBuilds { + targetBuild { + gradleVersion = "4.7" + tasks = [ "assemble" ] + } +} From c7338af1a576812634fd8ac63646876d78dc92b5 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Mon, 11 Jun 2018 16:03:58 +0300 Subject: [PATCH 05/23] add work-around for https://github.com/gradle/gradle/issues/5692 --- .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 85fe712fd8d85..20f63d5842a16 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -348,7 +348,10 @@ class BuildPlugin implements Plugin { // just a self contained test-fixture configuration, likely transitive and hellacious return } - configuration.resolutionStrategy.failOnVersionConflict() + configuration.resolutionStrategy { + failOnVersionConflict() + preferProjectModules() + } }) // force all dependencies added directly to compile/testCompile to be non-transitive, except for ES itself From ab67b252de9f6ac45d29e9ce21c700edb0438719 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 12 Jun 2018 13:35:39 +0300 Subject: [PATCH 06/23] work around https://github.com/gradle/gradle/issues/5696 --- .../org/elasticsearch/gradle/BuildPlugin.groovy | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 20f63d5842a16..20f9a57861635 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -478,13 +478,15 @@ 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) + 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) + } } } } From 2e8cb7e367543d83f60d0a3aeb3c8dd3a2462192 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 12 Jun 2018 14:00:53 +0300 Subject: [PATCH 07/23] Make use of Gradle build compare with reference project --- build.gradle | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index b774e265655b5..af88f768bb8e4 100644 --- a/build.gradle +++ b/build.gradle @@ -551,8 +551,19 @@ gradle.projectsEvaluated { apply plugin: 'compare-gradle-builds' compareGradleBuilds { - targetBuild { - gradleVersion = "4.7" - tasks = [ "assemble" ] + ext.referenceProject = "../elasticsearch_build_reference" + 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 { + projectDir = referenceProject + tasks = [ "clean", "assemble" ] + } + targetBuild { + tasks = [ "clean", "assemble" ] + } } From eec1f43cc4cf051330a38b051b2c52afcd4141f9 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 12 Jun 2018 14:38:02 +0300 Subject: [PATCH 08/23] Make the manifest more compare friendly --- build.gradle | 4 ++++ .../groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/build.gradle b/build.gradle index 6efc4643615a5..43d59e7b249cb 100644 --- a/build.gradle +++ b/build.gradle @@ -574,10 +574,14 @@ compareGradleBuilds { } } 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/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index a72a189a7a513..bddb6e78fdf45 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -630,6 +630,13 @@ 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.attributes( + 'Gradle-Version': 'compare_friendly', + 'Build-Date': 'compare_friendly' + ) + } } // add license/notice files project.afterEvaluate { From d0f7e9482194a26e564797c73c6027c5c82ac3e1 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 12 Jun 2018 16:19:11 +0300 Subject: [PATCH 09/23] Clear the manifest in compare friendly mode --- .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index bddb6e78fdf45..a8b677e582258 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -632,10 +632,7 @@ class BuildPlugin implements Plugin { } // 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.attributes( - 'Gradle-Version': 'compare_friendly', - 'Build-Date': 'compare_friendly' - ) + jarTask.manifest.getAttributes().clear() } } // add license/notice files From 3f5840a046795aa65bd7466743ac465c00cbf4fd Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 12 Jun 2018 16:37:57 +0300 Subject: [PATCH 10/23] Remove animalsniffer from buildscript classpath --- buildSrc/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 50a6f07077845..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.4.3' } /***************************************************************************** From d7c4d178a538c3115f96be0dbd5ee8139c531834 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 12 Jun 2018 17:50:19 +0300 Subject: [PATCH 11/23] Fix javadoc errors --- .../main/java/org/elasticsearch/client/RestClient.java | 4 ++-- .../src/main/java/org/elasticsearch/search/SearchHit.java | 4 ++-- .../bucket/composite/CompositeAggregator.java | 2 +- .../bucket/composite/CompositeValuesCollectorQueue.java | 2 +- .../bucket/composite/SingleDimensionValuesSource.java | 8 ++++---- .../org/elasticsearch/xpack/rollup/job/RollupIndexer.java | 3 ++- 6 files changed, 12 insertions(+), 11 deletions(-) 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 82039cab5d04c..1a2d767d68923 100644 --- a/client/rest/src/main/java/org/elasticsearch/client/RestClient.java +++ b/client/rest/src/main/java/org/elasticsearch/client/RestClient.java @@ -1008,8 +1008,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/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 7e39a6262d225..622a365f0e91f 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 @@ -201,7 +201,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/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 3ba3611293fdc..730a1669616d4 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 From f2c39ea037418f11fe54b3620b2f1b514e17e37f Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 12 Jun 2018 18:45:16 +0300 Subject: [PATCH 12/23] Upgrade bouncycastle Required to fix `bcprov-jdk15on-1.55.jar; invalid manifest format ` on jdk 11 --- plugins/ingest-attachment/build.gradle | 2 +- x-pack/plugin/core/build.gradle | 4 ++-- x-pack/plugin/security/build.gradle | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/ingest-attachment/build.gradle b/plugins/ingest-attachment/build.gradle index 3bca078bd59c4..49c13388ae697 100644 --- a/plugins/ingest-attachment/build.gradle +++ b/plugins/ingest-attachment/build.gradle @@ -25,7 +25,7 @@ esplugin { versions << [ 'tika': '1.17', 'pdfbox': '2.0.8', - 'bouncycastle': '1.55', + 'bouncycastle': '1.59', 'poi': '3.17', 'mime4j': '0.8.1' ] diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 4bbe339a09b79..4bb0e0ffc031b 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -35,8 +35,8 @@ dependencies { // security deps compile 'com.unboundid:unboundid-ldapsdk:3.2.0' - compile 'org.bouncycastle:bcprov-jdk15on:1.58' - compile 'org.bouncycastle:bcpkix-jdk15on:1.58' + compile 'org.bouncycastle:bcprov-jdk15on:1.59' + compile 'org.bouncycastle:bcpkix-jdk15on:1.59' compile project(path: ':modules:transport-netty4', configuration: 'runtime') testCompile 'org.elasticsearch:securemock:1.2' diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index 12533a389b5f1..90f594a00e6d2 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -22,8 +22,8 @@ dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') compile 'com.unboundid:unboundid-ldapsdk:3.2.0' - compile 'org.bouncycastle:bcprov-jdk15on:1.58' - compile 'org.bouncycastle:bcpkix-jdk15on:1.58' + compile 'org.bouncycastle:bcprov-jdk15on:1.59' + compile 'org.bouncycastle:bcpkix-jdk15on:1.59' // the following are all SAML dependencies - might as well download the whole internet compile "org.opensaml:opensaml-core:3.3.0" From 919e40404bb737eb933bddd00aee4de2ac799483 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Wed, 13 Jun 2018 11:15:47 +0300 Subject: [PATCH 13/23] Fix doc issues --- .../common/xcontent/BaseXContentTestCase.java | 2 +- .../org/elasticsearch/index/mapper/package-info.java | 4 +--- .../elasticsearch/index/shard/IndexShardTestCase.java | 2 +- .../org/elasticsearch/test/AbstractQueryTestCase.java | 1 - .../org/elasticsearch/license/ExpirationCallback.java | 6 +++--- .../java/org/elasticsearch/xpack/core/ssl/DerParser.java | 9 ++++----- .../java/org/elasticsearch/xpack/core/ssl/PemUtils.java | 2 -- .../xpack/core/ssl/RestrictedTrustManager.java | 2 +- .../ml/job/process/autodetect/AutodetectProcess.java | 1 - .../security/support/RestorableContextClassLoader.java | 2 +- .../xpack/sql/expression/predicate/Range.java | 4 ++-- 11 files changed, 14 insertions(+), 21 deletions(-) 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 86e55c1ab6a91..7d8699c320435 100644 --- a/server/src/test/java/org/elasticsearch/common/xcontent/BaseXContentTestCase.java +++ b/server/src/test/java/org/elasticsearch/common/xcontent/BaseXContentTestCase.java @@ -854,7 +854,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/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/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java
index 049880b1ac224..bd404b532cc36 100644
--- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java
+++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java
@@ -117,7 +117,6 @@ void writeUpdateDetectorRulesMessage(int detectorIndex, List rule
 
     /**
      * Ask the job to start persisting model state in the background
-     * @throws IOException
      */
     void persistJob() throws IOException;
 
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/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
+}

From c3bc727cd6cfbd7b8b77fc4647ae1ec935430f85 Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Wed, 13 Jun 2018 11:16:07 +0300
Subject: [PATCH 14/23] Downgrade bouncycastle to avoid invalid manifest

---
 distribution/tools/plugin-cli/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/distribution/tools/plugin-cli/build.gradle b/distribution/tools/plugin-cli/build.gradle
index c47786299bc2f..11663daf26be6 100644
--- a/distribution/tools/plugin-cli/build.gradle
+++ b/distribution/tools/plugin-cli/build.gradle
@@ -24,7 +24,7 @@ archivesBaseName = 'elasticsearch-plugin-cli'
 dependencies {
   compileOnly "org.elasticsearch:elasticsearch:${version}"
   compileOnly "org.elasticsearch:elasticsearch-cli:${version}"
-  compile "org.bouncycastle:bcpg-jdk15on:1.59"
+  compile "org.bouncycastle:bcpg-jdk15on:1.58"
   compile "org.bouncycastle:bcprov-jdk15on:1.59"
   testCompile "org.elasticsearch.test:framework:${version}"
   testCompile 'com.google.jimfs:jimfs:1.1'

From 2afe0384deb83effd5a3d41295eda537f54de591 Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Wed, 13 Jun 2018 17:12:54 +0300
Subject: [PATCH 15/23] Add checksum for new jars

---
 .../tools/plugin-cli/licenses/bcpg-jdk15on-1.58.jar.sha1         | 1 +
 .../tools/plugin-cli/licenses/bcpg-jdk15on-1.59.jar.sha1         | 1 -
 plugins/ingest-attachment/licenses/bcmail-jdk15on-1.55.jar.sha1  | 1 -
 plugins/ingest-attachment/licenses/bcmail-jdk15on-1.59.jar.sha1  | 1 +
 plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.55.jar.sha1  | 1 -
 plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.59.jar.sha1  | 1 +
 plugins/ingest-attachment/licenses/bcprov-jdk15on-1.55.jar.sha1  | 1 -
 plugins/ingest-attachment/licenses/bcprov-jdk15on-1.59.jar.sha1  | 1 +
 x-pack/plugin/core/licenses/bcpkix-jdk15on-1.58.jar.sha1         | 1 -
 x-pack/plugin/core/licenses/bcpkix-jdk15on-1.59.jar.sha1         | 1 +
 x-pack/plugin/core/licenses/bcprov-jdk15on-1.58.jar.sha1         | 1 -
 x-pack/plugin/core/licenses/bcprov-jdk15on-1.59.jar.sha1         | 1 +
 12 files changed, 6 insertions(+), 6 deletions(-)
 create mode 100644 distribution/tools/plugin-cli/licenses/bcpg-jdk15on-1.58.jar.sha1
 delete mode 100644 distribution/tools/plugin-cli/licenses/bcpg-jdk15on-1.59.jar.sha1
 delete mode 100644 plugins/ingest-attachment/licenses/bcmail-jdk15on-1.55.jar.sha1
 create mode 100644 plugins/ingest-attachment/licenses/bcmail-jdk15on-1.59.jar.sha1
 delete mode 100644 plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.55.jar.sha1
 create mode 100644 plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.59.jar.sha1
 delete mode 100644 plugins/ingest-attachment/licenses/bcprov-jdk15on-1.55.jar.sha1
 create mode 100644 plugins/ingest-attachment/licenses/bcprov-jdk15on-1.59.jar.sha1
 delete mode 100644 x-pack/plugin/core/licenses/bcpkix-jdk15on-1.58.jar.sha1
 create mode 100644 x-pack/plugin/core/licenses/bcpkix-jdk15on-1.59.jar.sha1
 delete mode 100644 x-pack/plugin/core/licenses/bcprov-jdk15on-1.58.jar.sha1
 create mode 100644 x-pack/plugin/core/licenses/bcprov-jdk15on-1.59.jar.sha1

diff --git a/distribution/tools/plugin-cli/licenses/bcpg-jdk15on-1.58.jar.sha1 b/distribution/tools/plugin-cli/licenses/bcpg-jdk15on-1.58.jar.sha1
new file mode 100644
index 0000000000000..dd66ae4cbe1a5
--- /dev/null
+++ b/distribution/tools/plugin-cli/licenses/bcpg-jdk15on-1.58.jar.sha1
@@ -0,0 +1 @@
+b92c863d75bbdbfa88f08301cb243f406a58bec4
\ No newline at end of file
diff --git a/distribution/tools/plugin-cli/licenses/bcpg-jdk15on-1.59.jar.sha1 b/distribution/tools/plugin-cli/licenses/bcpg-jdk15on-1.59.jar.sha1
deleted file mode 100644
index 0c0be50c906a3..0000000000000
--- a/distribution/tools/plugin-cli/licenses/bcpg-jdk15on-1.59.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-ee93e5376bb6cf0a15c027b5f5e4393f2738e709
\ No newline at end of file
diff --git a/plugins/ingest-attachment/licenses/bcmail-jdk15on-1.55.jar.sha1 b/plugins/ingest-attachment/licenses/bcmail-jdk15on-1.55.jar.sha1
deleted file mode 100644
index 8fdfb8f580780..0000000000000
--- a/plugins/ingest-attachment/licenses/bcmail-jdk15on-1.55.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5cea2dada69b98698ea975a5c1dd3c91ac8ffbb6
\ No newline at end of file
diff --git a/plugins/ingest-attachment/licenses/bcmail-jdk15on-1.59.jar.sha1 b/plugins/ingest-attachment/licenses/bcmail-jdk15on-1.59.jar.sha1
new file mode 100644
index 0000000000000..dde0a237a186b
--- /dev/null
+++ b/plugins/ingest-attachment/licenses/bcmail-jdk15on-1.59.jar.sha1
@@ -0,0 +1 @@
+db389ade95f48592908a84e7050a691c8834723c
\ No newline at end of file
diff --git a/plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.55.jar.sha1 b/plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.55.jar.sha1
deleted file mode 100644
index a4d546be04fc2..0000000000000
--- a/plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.55.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-6392d8cba22b722c6570d660ca0b3921ff1bae4f
\ No newline at end of file
diff --git a/plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.59.jar.sha1 b/plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.59.jar.sha1
new file mode 100644
index 0000000000000..be5e561ee9a76
--- /dev/null
+++ b/plugins/ingest-attachment/licenses/bcpkix-jdk15on-1.59.jar.sha1
@@ -0,0 +1 @@
+9cef0aab8a4bb849a8476c058ce3ff302aba3fff
\ No newline at end of file
diff --git a/plugins/ingest-attachment/licenses/bcprov-jdk15on-1.55.jar.sha1 b/plugins/ingest-attachment/licenses/bcprov-jdk15on-1.55.jar.sha1
deleted file mode 100644
index 1c507e17b88e0..0000000000000
--- a/plugins/ingest-attachment/licenses/bcprov-jdk15on-1.55.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-935f2e57a00ec2c489cbd2ad830d4a399708f979
\ No newline at end of file
diff --git a/plugins/ingest-attachment/licenses/bcprov-jdk15on-1.59.jar.sha1 b/plugins/ingest-attachment/licenses/bcprov-jdk15on-1.59.jar.sha1
new file mode 100644
index 0000000000000..aa42dbb8f6906
--- /dev/null
+++ b/plugins/ingest-attachment/licenses/bcprov-jdk15on-1.59.jar.sha1
@@ -0,0 +1 @@
+2507204241ab450456bdb8e8c0a8f986e418bd99
\ No newline at end of file
diff --git a/x-pack/plugin/core/licenses/bcpkix-jdk15on-1.58.jar.sha1 b/x-pack/plugin/core/licenses/bcpkix-jdk15on-1.58.jar.sha1
deleted file mode 100644
index 1fbdc7fcc1fa8..0000000000000
--- a/x-pack/plugin/core/licenses/bcpkix-jdk15on-1.58.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-15a760a039b040e767a75c77ffcc4ff62558f903
\ No newline at end of file
diff --git a/x-pack/plugin/core/licenses/bcpkix-jdk15on-1.59.jar.sha1 b/x-pack/plugin/core/licenses/bcpkix-jdk15on-1.59.jar.sha1
new file mode 100644
index 0000000000000..be5e561ee9a76
--- /dev/null
+++ b/x-pack/plugin/core/licenses/bcpkix-jdk15on-1.59.jar.sha1
@@ -0,0 +1 @@
+9cef0aab8a4bb849a8476c058ce3ff302aba3fff
\ No newline at end of file
diff --git a/x-pack/plugin/core/licenses/bcprov-jdk15on-1.58.jar.sha1 b/x-pack/plugin/core/licenses/bcprov-jdk15on-1.58.jar.sha1
deleted file mode 100644
index 95bc28eb146ef..0000000000000
--- a/x-pack/plugin/core/licenses/bcprov-jdk15on-1.58.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-2c9aa1c4e3372b447ba5daabade4adf2a2264b12
\ No newline at end of file
diff --git a/x-pack/plugin/core/licenses/bcprov-jdk15on-1.59.jar.sha1 b/x-pack/plugin/core/licenses/bcprov-jdk15on-1.59.jar.sha1
new file mode 100644
index 0000000000000..aa42dbb8f6906
--- /dev/null
+++ b/x-pack/plugin/core/licenses/bcprov-jdk15on-1.59.jar.sha1
@@ -0,0 +1 @@
+2507204241ab450456bdb8e8c0a8f986e418bd99
\ No newline at end of file

From 0807e7d530b22bbea235c4aa69aec9372ed90cdc Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Wed, 13 Jun 2018 17:13:27 +0300
Subject: [PATCH 16/23] Update tika permissions for jdk 11

---
 .../org/elasticsearch/ingest/attachment/TikaImpl.java | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/plugins/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/TikaImpl.java b/plugins/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/TikaImpl.java
index 97ca1c0b19774..c88aa21bd2f3f 100644
--- a/plugins/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/TikaImpl.java
+++ b/plugins/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/TikaImpl.java
@@ -163,12 +163,11 @@ static PermissionCollection getRestrictedPermissions() {
         perms.add(new RuntimePermission("getClassLoader"));
         // ZipFile needs accessDeclaredMembers on JDK 10; cf. https://bugs.openjdk.java.net/browse/JDK-8187485
         if (JavaVersion.current().compareTo(JavaVersion.parse("10")) >= 0) {
-            /*
-             * See if this permission can be removed in JDK 11, bump the version here to 12 if not. If this permission can be removed, also
-             * remove the grant in the plugin-security.policy.
-             */
-            assert JavaVersion.current().compareTo(JavaVersion.parse("11")) < 0;
-            perms.add(new RuntimePermission("accessDeclaredMembers"));
+            if (JavaVersion.current().compareTo(JavaVersion.parse("11")) < 0) {
+                // TODO remove this and from plugin-security.policy when JDK 11 is the only one we support
+                // this is needed pre 11, but it's fixed in 11 : https://bugs.openjdk.java.net/browse/JDK-8187485
+                perms.add(new RuntimePermission("accessDeclaredMembers"));
+            }
         }
         perms.setReadOnly();
         return perms;

From d39e5730b52910d697d8ddc45eb6768f50671852 Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Wed, 13 Jun 2018 19:21:42 +0300
Subject: [PATCH 17/23] Mute test failing on jdk 11

---
 .../ingest/attachment/AttachmentProcessorTests.java              | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins/ingest-attachment/src/test/java/org/elasticsearch/ingest/attachment/AttachmentProcessorTests.java b/plugins/ingest-attachment/src/test/java/org/elasticsearch/ingest/attachment/AttachmentProcessorTests.java
index 598d3f4e8175c..8cb58d12e7b86 100644
--- a/plugins/ingest-attachment/src/test/java/org/elasticsearch/ingest/attachment/AttachmentProcessorTests.java
+++ b/plugins/ingest-attachment/src/test/java/org/elasticsearch/ingest/attachment/AttachmentProcessorTests.java
@@ -289,6 +289,7 @@ private Map parseDocument(String file, AttachmentProcessor proce
         return attachmentData;
     }
 
+    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/31305")
     public void testIndexedChars() throws Exception {
         processor = new AttachmentProcessor(randomAlphaOfLength(10), "source_field",
             "target_field", EnumSet.allOf(AttachmentProcessor.Property.class), 19, false, null);

From e7715c57913ab46de2ebd18ead4f279b74e224d8 Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Thu, 14 Jun 2018 15:18:55 +0300
Subject: [PATCH 18/23] Work around wird Security bootstrap issue

https://github.com/elastic/elasticsearch/issues/31324
---
 server/src/main/java/org/elasticsearch/bootstrap/Security.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/elasticsearch/bootstrap/Security.java b/server/src/main/java/org/elasticsearch/bootstrap/Security.java
index 734b15d509877..3b4b1702cd903 100644
--- a/server/src/main/java/org/elasticsearch/bootstrap/Security.java
+++ b/server/src/main/java/org/elasticsearch/bootstrap/Security.java
@@ -228,7 +228,8 @@ static Policy readPolicy(URL policyFile, Map codebases) {
                     }
                     propertiesSet.add(property);
                     String previous = System.setProperty(property, url.toString());
-                    if (previous != null) {
+                    // allow to re-set to what was previusly there. https://github.com/elastic/elasticsearch/issues/31324
+                    if (previous != null && url.toString() != previous) {
                         throw new IllegalStateException("codebase property already set: " + property + " -> " + previous +
                                                         ", cannot set to " + url.toString());
                     }

From 89590fbb2681a8d6e8031fba4721161b3c3d6dac Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Thu, 14 Jun 2018 15:53:53 +0300
Subject: [PATCH 19/23] reference Gradle issues in comments

---
 .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
index a8b677e582258..e69fc3821a768 100644
--- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
@@ -350,6 +350,7 @@ class BuildPlugin implements Plugin {
             }
             configuration.resolutionStrategy { 
                 failOnVersionConflict()
+                // work around https://github.com/gradle/gradle/issues/5692
                 preferProjectModules()
             }
         })
@@ -478,6 +479,8 @@ class BuildPlugin implements Plugin {
                 }
             }
 
+            // 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

From c406996af64e64c1e63597ea2df15ad526e265f5 Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Thu, 14 Jun 2018 16:03:11 +0300
Subject: [PATCH 20/23] Conditionally configure build compare

---
 build.gradle | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/build.gradle b/build.gradle
index 43d59e7b249cb..be7fc4e65406f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -564,24 +564,26 @@ gradle.projectsEvaluated {
 
 apply plugin: 'compare-gradle-builds'
 
-compareGradleBuilds {
-  ext.referenceProject = "../elasticsearch_build_reference"
-  doFirst {
-    if (file(referenceProject).exists() == false) {
-      throw new GradleException(
-              "Use git worktree to check out a version to compare against to ../elasticsearch_build_reference"
-      )
+if (System.properties.get("build.compare") != null) {
+  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"]
     }
-  }
-  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"]
   }
 }

From e1b579d008e9ae359a2aa5bdf66e565062138447 Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Fri, 15 Jun 2018 10:57:10 +0300
Subject: [PATCH 21/23] Extend security fix to versioned jars

---
 server/src/main/java/org/elasticsearch/bootstrap/Security.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/elasticsearch/bootstrap/Security.java b/server/src/main/java/org/elasticsearch/bootstrap/Security.java
index 3b4b1702cd903..80635932b7df6 100644
--- a/server/src/main/java/org/elasticsearch/bootstrap/Security.java
+++ b/server/src/main/java/org/elasticsearch/bootstrap/Security.java
@@ -221,7 +221,8 @@ static Policy readPolicy(URL policyFile, Map codebases) {
                     if (aliasProperty.equals(property) == false) {
                         propertiesSet.add(aliasProperty);
                         String previous = System.setProperty(aliasProperty, url.toString());
-                        if (previous != null) {
+                        // allow to re-set to what was previusly there. https://github.com/elastic/elasticsearch/issues/31324
+                        if (previous != null && url.toString() != previous) {
                             throw new IllegalStateException("codebase property already set: " + aliasProperty + " -> " + previous +
                                                             ", cannot set to " + url.toString());
                         }

From 2f71509851dd5a7bd2b85c43a0aad1450c37881a Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Fri, 15 Jun 2018 12:35:29 +0300
Subject: [PATCH 22/23] fix equals check

---
 .../main/java/org/elasticsearch/bootstrap/Security.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/src/main/java/org/elasticsearch/bootstrap/Security.java b/server/src/main/java/org/elasticsearch/bootstrap/Security.java
index 80635932b7df6..ca2a0ca3ed810 100644
--- a/server/src/main/java/org/elasticsearch/bootstrap/Security.java
+++ b/server/src/main/java/org/elasticsearch/bootstrap/Security.java
@@ -221,16 +221,16 @@ static Policy readPolicy(URL policyFile, Map codebases) {
                     if (aliasProperty.equals(property) == false) {
                         propertiesSet.add(aliasProperty);
                         String previous = System.setProperty(aliasProperty, url.toString());
-                        // allow to re-set to what was previusly there. https://github.com/elastic/elasticsearch/issues/31324
-                        if (previous != null && url.toString() != previous) {
+                        // allow to re-set to what was previously there. https://github.com/elastic/elasticsearch/issues/31324
+                        if (previous != null && url.toString().equals(previous) == false) {
                             throw new IllegalStateException("codebase property already set: " + aliasProperty + " -> " + previous +
                                                             ", cannot set to " + url.toString());
                         }
                     }
                     propertiesSet.add(property);
                     String previous = System.setProperty(property, url.toString());
-                    // allow to re-set to what was previusly there. https://github.com/elastic/elasticsearch/issues/31324
-                    if (previous != null && url.toString() != previous) {
+                    // allow to re-set to what was previously there. https://github.com/elastic/elasticsearch/issues/31324
+                    if (previous != null && url.toString().equals(previous) == false) {
                         throw new IllegalStateException("codebase property already set: " + property + " -> " + previous +
                                                         ", cannot set to " + url.toString());
                     }

From 19844863f5980cdebb2eb9b7cd7b14161e47c3da Mon Sep 17 00:00:00 2001
From: Alpar Torok 
Date: Fri, 15 Jun 2018 12:37:21 +0300
Subject: [PATCH 23/23] Add JDK11 to CI

---
 .ci/java-versions.properties | 4 ++--
 .ci/matrix-build-javas.yml   | 1 +
 .ci/matrix-runtime-javas.yml | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.ci/java-versions.properties b/.ci/java-versions.properties
index a0713ce128e6f..d13f1ea576c0f 100644
--- a/.ci/java-versions.properties
+++ b/.ci/java-versions.properties
@@ -4,5 +4,5 @@
 # build and test Elasticsearch for this branch. Valid Java versions
 # are 'java' or 'openjdk' followed by the major release number.
 
-ES_BUILD_JAVA=java10
-ES_RUNTIME_JAVA=java8
+ES_BUILD_JAVA=java11
+ES_RUNTIME_JAVA=java11
diff --git a/.ci/matrix-build-javas.yml b/.ci/matrix-build-javas.yml
index 17aa4b0bf222a..bbb61b8eb6df0 100644
--- a/.ci/matrix-build-javas.yml
+++ b/.ci/matrix-build-javas.yml
@@ -7,3 +7,4 @@
 
 ES_BUILD_JAVA:
   - java10
+  - java11
diff --git a/.ci/matrix-runtime-javas.yml b/.ci/matrix-runtime-javas.yml
index 72282ca805afd..737e15ada208a 100644
--- a/.ci/matrix-runtime-javas.yml
+++ b/.ci/matrix-runtime-javas.yml
@@ -8,3 +8,4 @@
 ES_RUNTIME_JAVA:
   - java8
   - java10
+  - java11