Improve error output and add team id matcher template creator

This commit is contained in:
2020-11-04 21:22:27 +01:00
parent 2f411aae67
commit d42edcf01c
15 changed files with 158 additions and 154 deletions
@@ -208,8 +208,12 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
int foundMatches = 0;
TLWMatch matchingMatch = null;
for(TLWMatch match : tlwMatches) {
int apiTeamIdHome = TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch.getTeamIdHome());
int apiTeamIdGuest = TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch.getTeamIdGuest());
Integer apiTeamIdHome = TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch, TeamIDMatcher.HOME);
Integer apiTeamIdGuest = TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch, TeamIDMatcher.GUEST);
if(apiTeamIdHome == null
|| apiTeamIdGuest == null) {
throw new NullPointerException();
}
if(
apiTeamIdHome == match.getTeamIdHome()
&& apiTeamIdGuest == match.getTeamIdGuest()