diff --git a/core/src/main/java/org/elasticsearch/common/cache/CacheBuilder.java b/core/src/main/java/org/elasticsearch/common/cache/CacheBuilder.java index 67c8d508ba5..9813a7ab0f9 100644 --- a/core/src/main/java/org/elasticsearch/common/cache/CacheBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/cache/CacheBuilder.java @@ -91,7 +91,7 @@ public class CacheBuilder { } public Cache build() { - Cache cache = new Cache(); + Cache cache = new Cache<>(); if (maximumWeight != -1) { cache.setMaximumWeight(maximumWeight); }