Remove -Xlint exclusions in the ingest-geoip module. (#40629)
Relates to #40366
This commit is contained in:
parent
54b0ff8e33
commit
4b3b002942
|
@ -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 '/'
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue