From 8e85914d649f0b19b078b2dc3fb3d4205c0bb83e Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Mon, 11 Jul 2016 22:56:30 -0400 Subject: [PATCH] Change default values in GETDumpsType.java to be immutable versions --- src/main/java/net/frozenorb/apiv3/route/GETDumpsType.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/frozenorb/apiv3/route/GETDumpsType.java b/src/main/java/net/frozenorb/apiv3/route/GETDumpsType.java index fa9db3f..d8caa9b 100644 --- a/src/main/java/net/frozenorb/apiv3/route/GETDumpsType.java +++ b/src/main/java/net/frozenorb/apiv3/route/GETDumpsType.java @@ -1,5 +1,7 @@ package net.frozenorb.apiv3.route; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.vertx.core.Handler; import io.vertx.ext.web.RoutingContext; @@ -13,9 +15,9 @@ import java.util.concurrent.TimeUnit; public final class GETDumpsType implements Handler { - private static List banCache = new LinkedList<>(); - private static List blacklistCache = new LinkedList<>(); - private static Map> grantCache = new HashMap<>(); + private static List banCache = ImmutableList.of(); + private static List blacklistCache = ImmutableList.of(); + private static Map> grantCache = ImmutableMap.of(); static { APIv3.getVertxInstance().setPeriodic(TimeUnit.MINUTES.toMillis(5), (id) -> updateCache());