Narrowed variables scope.

This commit is contained in:
vraskulin 2017-02-15 16:05:18 +03:00
parent 09da478b38
commit f1ef3bf68b
20 changed files with 42 additions and 60 deletions

View file

@ -64,9 +64,8 @@ public class TournamentFactory {
public Tournament createTournament(String tournamentType, TournamentOptions options) {
Tournament tournament;
Constructor<Tournament> con;
try {
con = tournaments.get(tournamentType).getConstructor(TournamentOptions.class);
Constructor<Tournament> con = tournaments.get(tournamentType).getConstructor(TournamentOptions.class);
tournament = con.newInstance(options);
// transfer set information, create short info string for included sets
tournament.setTournamentType(tournamentTypes.get(tournamentType));