From 3cb8dad3917cad4df95340253db5f5b743844f58 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Fri, 24 Jul 2015 22:29:10 +0200 Subject: Did many CLI tests, have to rethink the MTGUniverse thing to make it more testable --- src/eu/equalparts/cardbase/utils/MTGUniverse.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/eu/equalparts/cardbase/utils') diff --git a/src/eu/equalparts/cardbase/utils/MTGUniverse.java b/src/eu/equalparts/cardbase/utils/MTGUniverse.java index 7a58c1c..b40e518 100644 --- a/src/eu/equalparts/cardbase/utils/MTGUniverse.java +++ b/src/eu/equalparts/cardbase/utils/MTGUniverse.java @@ -40,8 +40,7 @@ public final class MTGUniverse { /** * A cache of CardSets to avoid querying the server many times for the same information. */ - private static ArrayList cardSets; - + private static List cardSets; /** * A cache of {@code FullCardSets} to avoid querying the server many times for the same information. */ @@ -110,13 +109,13 @@ public final class MTGUniverse { /** * @return a list of all card sets in the form of {@code CardSet} objects. */ - public static ArrayList getCardSetList() { + public static List getCardSetList() { // if the list isn't cached, fetch and cache it if (cardSets == null) { try { cardSets = JSON.mapper.readValue(new URL(BASE_DATA_URL + "SetList.json"), new TypeReference>() {}); } catch (Exception e) { - System.out.println("Error: could not fetch/parse set code list from upstream, loading fallback json..."); + System.out.println("Error: could not fetch or parse set code list from upstream, using fallback json..."); e.printStackTrace(); try { -- cgit v1.2.3