Remove -Xlint exclusions in the ingest-geoip module. (#40629)

Relates to #40366
This commit is contained in:
Martijn van Groningen 2019-04-01 16:20:20 +02:00
parent 54b0ff8e33
commit 4b3b002942
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
2 changed files with 2 additions and 5 deletions

View File

@ -41,9 +41,6 @@ task copyDefaultGeoIp2DatabaseFiles(type: Copy) {
project.bundlePlugin.dependsOn(copyDefaultGeoIp2DatabaseFiles) project.bundlePlugin.dependsOn(copyDefaultGeoIp2DatabaseFiles)
compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked,-serial"
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
bundlePlugin { bundlePlugin {
from("${project.buildDir}/ingest-geoip") { from("${project.buildDir}/ingest-geoip") {
into '/' into '/'

View File

@ -171,14 +171,14 @@ public class IngestGeoIpPlugin extends Plugin implements IngestPlugin, Closeable
* reduction of CPU usage. * reduction of CPU usage.
*/ */
static class GeoIpCache { static class GeoIpCache {
private final Cache<CacheKey, AbstractResponse> cache; private final Cache<CacheKey<?>, AbstractResponse> cache;
//package private for testing //package private for testing
GeoIpCache(long maxSize) { GeoIpCache(long maxSize) {
if (maxSize < 0) { if (maxSize < 0) {
throw new IllegalArgumentException("geoip max cache size must be 0 or greater"); throw new IllegalArgumentException("geoip max cache size must be 0 or greater");
} }
this.cache = CacheBuilder.<CacheKey, AbstractResponse>builder().setMaximumWeight(maxSize).build(); this.cache = CacheBuilder.<CacheKey<?>, AbstractResponse>builder().setMaximumWeight(maxSize).build();
} }
<T extends AbstractResponse> T putIfAbsent(InetAddress ip, Class<T> responseType, <T extends AbstractResponse> T putIfAbsent(InetAddress ip, Class<T> responseType,