Skip to content

Commit

Permalink
Fix #112 : Remove TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
axel3rd committed Sep 7, 2019
1 parent 65d576f commit 75be168
Show file tree
Hide file tree
Showing 3 changed files with 12,128 additions and 15,362 deletions.
7 changes: 2 additions & 5 deletions src/main/java/org/blondin/mpg/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ private static List<Player> calculateEfficiency(List<Player> players, MpgClient
if (failIfPlayerNotFound) {
throw e;
}
if (logWarnIfPlayerNotFound) {
if (logWarnIfPlayerNotFound && !ChampionshipType.CHAMPIONS_LEAGUE.equals(championship)) {
LOG.warn("WARN: Player can't be found in statistics: {}", player.getName());
}
player.setEfficiency(0);
Expand All @@ -394,9 +394,6 @@ private static ChampionshipStatsType getPlayerChampionshipType(MpgClient mpgClie
}
List<ChampionshipType> mercatos = Arrays.asList(ChampionshipType.LIGUE_1, ChampionshipType.LIGUE_2, ChampionshipType.PREMIER_LEAGUE,
ChampionshipType.LIGA, ChampionshipType.SERIE_A);
if (player.getName().contains("Skriniar")) {
System.out.println("TODO : Correct player should be found");
}
for (ChampionshipType m : mercatos) {
Mercato mercato = mpgClient.getMercato(m);
for (Player p : mercato.getPlayers()) {
Expand All @@ -405,7 +402,7 @@ private static ChampionshipStatsType getPlayerChampionshipType(MpgClient mpgClie
}
}
}
throw new PlayerNotFoundException(String.format("The player '%s' (id=%s) can not be found", player.getName(), player.getId()));
throw new PlayerNotFoundException(String.format("The player '%s' (id=%s) can not be found in mercatos", player.getName(), player.getId()));
}

private static void calculateEfficiencyForChampionship(MpgStatsClient stats, ChampionshipStatsType championship, Config config) {
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 75be168

Please sign in to comment.