Fix expire time of cache using TimeUnits

Change-Id: I6046a23ff7434eaf3cd94f14b757aba759575e06
diff --git a/src/main/java/com/googlesource/gerrit/plugins/manager/PluginsCentralCache.java b/src/main/java/com/googlesource/gerrit/plugins/manager/PluginsCentralCache.java
index 55fa815..1c490e0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/manager/PluginsCentralCache.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/manager/PluginsCentralCache.java
@@ -21,9 +21,9 @@
 import com.google.inject.name.Named;
 import com.googlesource.gerrit.plugins.manager.PluginsCentralLoader.ListKey;
 import com.googlesource.gerrit.plugins.manager.repository.PluginInfo;
-import java.time.Duration;
 import java.util.Collection;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
 
 public class PluginsCentralCache {
 
@@ -49,7 +49,7 @@
                 PluginsCentralCache.PLUGINS_LIST_CACHE_NAME,
                 ListKey.class,
                 new TypeLiteral<Collection<PluginInfo>>() {})
-            .expireAfterWrite(Duration.ofDays(1))
+            .expireAfterWrite(1, TimeUnit.DAYS)
             .loader(PluginsCentralLoader.class);
 
         bind(PluginsCentralCache.class);