diff --git a/src/main/java/cactusServer/models/Accounts.java b/src/main/java/cactusServer/models/Accounts.java index a70293f..42df1eb 100644 --- a/src/main/java/cactusServer/models/Accounts.java +++ b/src/main/java/cactusServer/models/Accounts.java @@ -11,7 +11,7 @@ public class Accounts { private static Accounts theInstance = null; private HashMap accounts = new HashMap<>(); - private HashSet idList = new HashSet(); + private HashSet idSet = new HashSet(); private Accounts() { @@ -26,7 +26,7 @@ public Account createAcount(String userID, String userName, String userPass) { System.out.println(userName); - if(!idList.add(userID)) { + if(!idSet.add(userID)) { return null; } Account newAccount = new Account(userName, userPass); @@ -42,7 +42,7 @@ } public Account loginAccount(String userID,String userPass) { - if(idList.contains(userID) && getAccount(userID).getPass().equals(userPass)) { + if(idSet.contains(userID) && getAccount(userID).getPass().equals(userPass)) { Accounts.getInstance().getAccount(userID).setLogin(true); return getAccount(userID); }else {