diff --git a/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java b/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java index 127a9622..03d994c8 100644 --- a/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java +++ b/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java @@ -500,7 +500,7 @@ public abstract class JobsDAO { else userData = Jobs.getPlayerManager().getPlayerInfo(uuid); - ArrayList jobs = new ArrayList(); + ArrayList jobs = new ArrayList<>(); if (userData == null) { recordNewPlayer(playerName, uuid); @@ -531,7 +531,7 @@ public abstract class JobsDAO { } public HashMap> getAllJobs() { - HashMap> map = new HashMap>(); + HashMap> map = new HashMap<>(); JobsConnection conn = getConnection(); if (conn == null) return map; @@ -544,7 +544,7 @@ public abstract class JobsDAO { int id = res.getInt("userid"); List ls = map.get(id); if (ls == null) - ls = new ArrayList(); + ls = new ArrayList<>(); ls.add(new JobsDAOData(res.getString("job"), res.getInt("level"), res.getInt("experience"))); map.put(id, ls); } @@ -558,7 +558,7 @@ public abstract class JobsDAO { } public HashMap getAllPoints() { - HashMap map = new HashMap(); + HashMap map = new HashMap<>(); JobsConnection conn = getConnection(); if (conn == null) return map; @@ -580,7 +580,7 @@ public abstract class JobsDAO { } public HashMap getAllArchivedJobs() { - HashMap map = new HashMap(); + HashMap map = new HashMap<>(); JobsConnection conn = getConnection(); if (conn == null) return map; @@ -621,7 +621,7 @@ public abstract class JobsDAO { } public HashMap> getAllLogs() { - HashMap> map = new HashMap>(); + HashMap> map = new HashMap<>(); JobsConnection conn = getConnection(); if (conn == null) return map; @@ -638,14 +638,14 @@ public abstract class JobsDAO { HashMap m = map.get(id); if (m == null) - m = new HashMap(); + m = new HashMap<>(); String action = res.getString("action"); Log log = m.get(action); if (log == null) log = new Log(action); - HashMap amounts = new HashMap(); + HashMap amounts = new HashMap<>(); amounts.put(CurrencyType.MONEY, res.getDouble("money")); amounts.put(CurrencyType.EXP, res.getDouble("exp")); amounts.put(CurrencyType.POINTS, res.getDouble("points")); @@ -667,7 +667,7 @@ public abstract class JobsDAO { return map; } - private HashMap> map = new HashMap>(); + private HashMap> map = new HashMap<>(); public List getAllJobs(PlayerInfo pInfo) { List list = map.get(pInfo.getID()); @@ -796,7 +796,7 @@ public abstract class JobsDAO { */ public synchronized List getAllJobsOffline(String userName) { - ArrayList jobs = new ArrayList(); + ArrayList jobs = new ArrayList<>(); PlayerInfo info = Jobs.getPlayerManager().getPlayerInfo(userName); if (info == null) @@ -900,7 +900,7 @@ public abstract class JobsDAO { } public synchronized HashMap loadPlayerLimits() { - HashMap map = new HashMap(); + HashMap map = new HashMap<>(); JobsConnection conn = getConnection(); if (conn == null) return map; @@ -993,7 +993,7 @@ public abstract class JobsDAO { if (conn == null) return null; - List list = new ArrayList(); + List list = new ArrayList<>(); PreparedStatement prest = null; ResultSet res = null; try { @@ -1139,7 +1139,7 @@ public abstract class JobsDAO { public List getGlobalTopList(int start) { JobsConnection conn = getConnection(); - List names = new ArrayList(); + List names = new ArrayList<>(); if (conn == null) return names; @@ -1558,7 +1558,7 @@ public abstract class JobsDAO { res = prest.executeQuery(); while (res.next()) { - HashMap amounts = new HashMap(); + HashMap amounts = new HashMap<>(); amounts.put(CurrencyType.MONEY, res.getDouble("money")); amounts.put(CurrencyType.EXP, res.getDouble("exp")); amounts.put(CurrencyType.POINTS, res.getDouble("points")); @@ -1789,7 +1789,7 @@ public abstract class JobsDAO { conn.setAutoCommit(false); int i = 0; - HashMap temp = new HashMap(Jobs.getExplore().getWorlds()); + HashMap temp = new HashMap<>(Jobs.getExplore().getWorlds()); for (Entry worlds : temp.entrySet()) { for (Entry oneChunk : worlds.getValue().getChunks().entrySet()) { @@ -1838,7 +1838,7 @@ public abstract class JobsDAO { int i = 0; - HashMap temp = new HashMap(Jobs.getExplore().getWorlds()); + HashMap temp = new HashMap<>(Jobs.getExplore().getWorlds()); for (Entry worlds : temp.entrySet()) { for (Entry oneChunk : worlds.getValue().getChunks().entrySet()) { @@ -1935,7 +1935,7 @@ public abstract class JobsDAO { */ public List getLognameList(int fromtime, int untiltime) { JobsConnection conn = getConnection(); - List nameList = new ArrayList(); + List nameList = new ArrayList<>(); if (conn == null) return nameList; PreparedStatement prest = null; @@ -1964,7 +1964,7 @@ public abstract class JobsDAO { * @return */ public ArrayList toplist(String jobsname, int limit) { - ArrayList jobs = new ArrayList(); + ArrayList jobs = new ArrayList<>(); JobsConnection conn = getConnection(); if (conn == null) return jobs;