From 445ce4bd4dc016242c772de260a6b89ae293acdf Mon Sep 17 00:00:00 2001 From: danijoo Date: Sun, 22 May 2016 19:47:45 +0200 Subject: [PATCH] fix ApiHandler#getLeagueEntries --- .../main/java/net/boreeas/riotapi/rest/ApiHandler.java | 8 ++++---- .../net/boreeas/riotapi/rest/ThrottledApiHandler.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rest/src/main/java/net/boreeas/riotapi/rest/ApiHandler.java b/rest/src/main/java/net/boreeas/riotapi/rest/ApiHandler.java index bd07ab9..9bf414f 100644 --- a/rest/src/main/java/net/boreeas/riotapi/rest/ApiHandler.java +++ b/rest/src/main/java/net/boreeas/riotapi/rest/ApiHandler.java @@ -217,7 +217,7 @@ private Map> getLeaguesVarArgs(long... summoners) { * @return A list of league entries * @see Official API documentation */ - public List getLeagueEntries(long summoner) { + public List getLeagueEntries(long summoner) { return getLeagueItemsVarArgs(summoner).get(summoner); } @@ -228,12 +228,12 @@ public List getLeagueEntries(long summoner) { * @return A map, mapping summoner ids to lists of league entries for that summoner * @see Official API documentation */ - public Map> getLeagueEntries(long... summoners) { + public Map> getLeagueEntries(long... summoners) { return getLeagueItemsVarArgs(summoners); } - private Map> getLeagueItemsVarArgs(long... summoners) { - Type type = new TypeToken>>() { + private Map> getLeagueItemsVarArgs(long... summoners) { + Type type = new TypeToken>>() { }.getType(); WebTarget tgt = leagueInfoTarget.path("by-summoner/" + concat(summoners)).path("entry"); return gson.fromJson($(tgt), type); diff --git a/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java b/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java index 2e238d2..da53445 100644 --- a/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java +++ b/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java @@ -242,7 +242,7 @@ public Future>> getLeagues(long... summoners) { * @return A list of league entries * @see Official API documentation */ - public Future> getLeagueEntries(long summoner) { + public Future> getLeagueEntries(long summoner) { return new ApiFuture<>(() -> handler.getLeagueEntries(summoner)); } @@ -252,7 +252,7 @@ public Future> getLeagueEntries(long summoner) { * @return A map, mapping summoner ids to lists of league entries for that summoner * @see Official API documentation */ - public Future>> getLeagueEntries(long... summoners) { + public Future>> getLeagueEntries(long... summoners) { return new ApiFuture<>(() -> handler.getLeagueEntries(summoners)); }