diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2015-07-24 22:29:10 +0200 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2015-07-24 22:29:10 +0200 |
commit | 3cb8dad3917cad4df95340253db5f5b743844f58 (patch) | |
tree | 39f17a8f90752f9b85a3572e845f92b3079eb0b6 /src/eu/equalparts/cardbase/utils | |
parent | f3ce19d1c5be34575adeaed0cf991a609ac8a10f (diff) |
Did many CLI tests, have to rethink the MTGUniverse thing to make it more testable
Diffstat (limited to 'src/eu/equalparts/cardbase/utils')
-rw-r--r-- | src/eu/equalparts/cardbase/utils/MTGUniverse.java | 7 |
1 files changed, 3 insertions, 4 deletions
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<CardSetInformation> cardSets; - + private static List<CardSetInformation> 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<CardSetInformation> getCardSetList() { + public static List<CardSetInformation> 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<ArrayList<CardSetInformation>>() {}); } 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 { |