public void load() throws IOException { FileReader fr = new FileReader(logFile); Object injection = helper.load(fr); fr.close(); if (injection instanceof HashMap) { cache.clear(); HashMap<String, List<HashMap<String, String>>> superObject = (HashMap<String, List<HashMap<String, String>>>) injection; for (Map.Entry<String, List<HashMap<String, String>>> entry : superObject.entrySet()) { List<LogEntry> logEntries = new LinkedList<>(); for (HashMap<String, String> dump : entry.getValue()) logEntries.add(LogEntry.parseDump(dump)); cache.put(Identity.deserializeIdentity(entry.getKey()).getUniqueId(), logEntries); } } }