Skip to content

Commit d8c0a39

Browse files
authored
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.
1 parent 5296c11 commit d8c0a39

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.apache.http.Consts;
3131
import org.apache.http.HttpHost;
3232
import org.apache.http.client.methods.HttpGet;
33-
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
3433
import org.elasticsearch.client.Response;
3534
import org.elasticsearch.client.ResponseException;
3635
import org.elasticsearch.client.RestClient;
@@ -148,8 +147,6 @@ private static HttpServer createHttpServer(final SniffResponse sniffResponse, fi
148147
return httpServer;
149148
}
150149

151-
//animal-sniffer doesn't like our usage of com.sun.net.httpserver.* classes
152-
@IgnoreJRERequirement
153150
private static class ResponseHandler implements HttpHandler {
154151
private final int sniffTimeoutMillis;
155152
private final SniffResponse sniffResponse;

client/test/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks
2121
import org.gradle.api.JavaVersion
2222

2323
apply plugin: 'elasticsearch.build'
24-
apply plugin: 'ru.vyarus.animalsniffer'
2524

2625
targetCompatibility = JavaVersion.VERSION_1_7
2726
sourceCompatibility = JavaVersion.VERSION_1_7
@@ -31,8 +30,6 @@ dependencies {
3130
compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
3231
compile "junit:junit:${versions.junit}"
3332
compile "org.hamcrest:hamcrest-all:${versions.hamcrest}"
34-
compile "org.codehaus.mojo:animal-sniffer-annotations:1.15"
35-
signature "org.codehaus.mojo.signature:java17:1.0@signature"
3633
}
3734

3835
forbiddenApisMain {

distribution/tools/launchers/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks
2121
import org.gradle.api.JavaVersion
2222

2323
apply plugin: 'elasticsearch.build'
24-
apply plugin: 'ru.vyarus.animalsniffer'
2524

2625
sourceCompatibility = JavaVersion.VERSION_1_7
2726
targetCompatibility = JavaVersion.VERSION_1_7
2827

2928
dependencies {
30-
signature "org.codehaus.mojo.signature:java17:1.0@signature"
31-
3229
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
3330
testCompile "junit:junit:${versions.junit}"
3431
testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"

0 commit comments

Comments
 (0)