private void readJudgeAccount(String pathName) { AccountManager accountManager = new AccountManager(); File file = new File(pathName); try (BufferedReader br = new BufferedReader(new FileReader(file))) { String line; while ((line = br.readLine()) != null) { String[] sp = line.split(","); this.judges.put(sp[0], new Judge(sp[0], null)); Map<String, String> judge_account = new HashMap<String, String>(); judge_account.put("account", sp[0]); judge_account.put("password", sp[1]); judge_account.put("type", "judge"); accountManager.addEntry(judge_account); } } catch (IOException e) { e.printStackTrace(); System.exit(1); } }