Use native constructors instead of Guava to instantiate empty collections
It's not necessary to use Guava's helper methods when instantiating empty collections. Just use the native constructors. Change-Id: I7f454909b15924ee49e149edf9f053da9f718502
This commit is contained in:
@@ -17,7 +17,6 @@ package com.google.gerrit.server.cache.h2;
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import com.google.gerrit.extensions.events.LifecycleListener;
|
||||
import com.google.gerrit.extensions.registration.DynamicMap;
|
||||
@@ -40,6 +39,7 @@ import org.slf4j.LoggerFactory;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
@@ -70,7 +70,7 @@ class H2CacheFactory implements PersistentCacheFactory, LifecycleListener {
|
||||
config = cfg;
|
||||
cacheDir = getCacheDir(site, cfg.getString("cache", null, "directory"));
|
||||
h2CacheSize = cfg.getLong("cache", null, "h2CacheSize", -1);
|
||||
caches = Lists.newLinkedList();
|
||||
caches = new LinkedList<>();
|
||||
this.cacheMap = cacheMap;
|
||||
|
||||
if (cacheDir != null) {
|
||||
|
||||
Reference in New Issue
Block a user