From 270b8ee321f01213c03225c778cf57bf579eca69 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 7 Jun 2018 17:00:22 -0400 Subject: [PATCH] Remove vestiges of animal sniffer (#31178) We no longer need animal sniffer because we use JDK functionality (introduced in JDK 9) to target older versions of the JDK for compilation. This functionality means that the JDK handles the problem of ensuring that we do not use JDK APIs from the version that we are compiling from that are not available in the version that we are compiling to. A previous commit removed this for the REST client (where we target JDK 7) but a few traces were left behind. --- .../client/sniff/ElasticsearchHostsSnifferTests.java | 3 --- client/test/build.gradle | 3 --- distribution/tools/launchers/build.gradle | 3 --- 3 files changed, 9 deletions(-) diff --git a/client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java b/client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java index f13d175110434..ed2744df31c61 100644 --- a/client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java +++ b/client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java @@ -30,7 +30,6 @@ import org.apache.http.Consts; import org.apache.http.HttpHost; import org.apache.http.client.methods.HttpGet; -import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement; import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; import org.elasticsearch.client.RestClient; @@ -148,8 +147,6 @@ private static HttpServer createHttpServer(final SniffResponse sniffResponse, fi return httpServer; } - //animal-sniffer doesn't like our usage of com.sun.net.httpserver.* classes - @IgnoreJRERequirement private static class ResponseHandler implements HttpHandler { private final int sniffTimeoutMillis; private final SniffResponse sniffResponse; diff --git a/client/test/build.gradle b/client/test/build.gradle index 8842e8b15e4bf..59c45186fe76b 100644 --- a/client/test/build.gradle +++ b/client/test/build.gradle @@ -21,7 +21,6 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks import org.gradle.api.JavaVersion apply plugin: 'elasticsearch.build' -apply plugin: 'ru.vyarus.animalsniffer' targetCompatibility = JavaVersion.VERSION_1_7 sourceCompatibility = JavaVersion.VERSION_1_7 @@ -31,8 +30,6 @@ dependencies { compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" compile "junit:junit:${versions.junit}" compile "org.hamcrest:hamcrest-all:${versions.hamcrest}" - compile "org.codehaus.mojo:animal-sniffer-annotations:1.15" - signature "org.codehaus.mojo.signature:java17:1.0@signature" } forbiddenApisMain { diff --git a/distribution/tools/launchers/build.gradle b/distribution/tools/launchers/build.gradle index 27e8712ffcbe2..ff0f4c473a49e 100644 --- a/distribution/tools/launchers/build.gradle +++ b/distribution/tools/launchers/build.gradle @@ -21,14 +21,11 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks import org.gradle.api.JavaVersion apply plugin: 'elasticsearch.build' -apply plugin: 'ru.vyarus.animalsniffer' sourceCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7 dependencies { - signature "org.codehaus.mojo.signature:java17:1.0@signature" - testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testCompile "junit:junit:${versions.junit}" testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"