Skip to content

Commit

Permalink
Remove vestiges of animal sniffer (#31178)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasontedor committed Jun 7, 2018
1 parent b1b7201 commit 270b8ee
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions client/test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions distribution/tools/launchers/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 270b8ee

Please sign in to comment.