From 36574ec4e21eced99ac37c2a32da5677c4077810 Mon Sep 17 00:00:00 2001 From: Fuzzlemann Date: Tue, 1 Aug 2017 18:15:06 +0200 Subject: [PATCH] Add some more lambda --- .../plan/data/cache/InspectCacheHandler.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/data/cache/InspectCacheHandler.java b/Plan/src/main/java/com/djrapitops/plan/data/cache/InspectCacheHandler.java index a8fb5162b..e475ae549 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/cache/InspectCacheHandler.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/cache/InspectCacheHandler.java @@ -44,17 +44,14 @@ public class InspectCacheHandler { * @param uuid UUID of the player. */ public void cache(UUID uuid) { - DBCallableProcessor cacher = new DBCallableProcessor() { - @Override - public void process(UserData data) { - cache.put(uuid, new UserData(data)); - cacheTimes.put(uuid, MiscUtils.getTime()); - PageCacheHandler.cachePage("inspectPage: " + uuid.toString(), () -> new InspectPageResponse(Plan.getInstance().getUiServer().getDataReqHandler(), uuid)); - try { - ExportUtility.writeInspectHtml(data, ExportUtility.getPlayersFolder(ExportUtility.getFolder())); - } catch (IOException ex) { - Log.toLog(this.getClass().getName(), ex); - } + DBCallableProcessor cacher = data -> { + cache.put(uuid, new UserData(data)); + cacheTimes.put(uuid, MiscUtils.getTime()); + PageCacheHandler.cachePage("inspectPage: " + uuid.toString(), () -> new InspectPageResponse(Plan.getInstance().getUiServer().getDataReqHandler(), uuid)); + try { + ExportUtility.writeInspectHtml(data, ExportUtility.getPlayersFolder(ExportUtility.getFolder())); + } catch (IOException ex) { + Log.toLog(this.getClass().getName(), ex); } };