From e60c3e3c2ba5135615d76e279ab87c136ccc2e5f Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Fri, 29 Mar 2019 10:06:10 +0100 Subject: [PATCH] Remove -Xlint exclusions in the ingest-geoip module. Relates to #40366 --- modules/ingest-geoip/build.gradle | 3 --- .../org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/ingest-geoip/build.gradle b/modules/ingest-geoip/build.gradle index f2dec9cd7b7fa..7b0f4a83e91b5 100644 --- a/modules/ingest-geoip/build.gradle +++ b/modules/ingest-geoip/build.gradle @@ -41,9 +41,6 @@ task copyDefaultGeoIp2DatabaseFiles(type: Copy) { project.bundlePlugin.dependsOn(copyDefaultGeoIp2DatabaseFiles) -compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked,-serial" -compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked" - bundlePlugin { from("${project.buildDir}/ingest-geoip") { into '/' diff --git a/modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java b/modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java index 8769a643e1d3c..a170b4417739b 100644 --- a/modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java +++ b/modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java @@ -171,14 +171,14 @@ public void close() throws IOException { * reduction of CPU usage. */ static class GeoIpCache { - private final Cache cache; + private final Cache, AbstractResponse> cache; //package private for testing GeoIpCache(long maxSize) { if (maxSize < 0) { throw new IllegalArgumentException("geoip max cache size must be 0 or greater"); } - this.cache = CacheBuilder.builder().setMaximumWeight(maxSize).build(); + this.cache = CacheBuilder., AbstractResponse>builder().setMaximumWeight(maxSize).build(); } T putIfAbsent(InetAddress ip, Class responseType,