From e87cfec1ecf013d404b9310b7f335e7ee004fc6e Mon Sep 17 00:00:00 2001 From: yam <32262916+yashasvi128@users.noreply.github.com> Date: Tue, 30 Oct 2018 21:37:25 +0530 Subject: [PATCH] Simplified code in DAO, changes to Git Functions (#1174) * Simplified code in DAO, changes to Git Functions * fixed append i +1 issue --- src/ai/susi/DAO.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ai/susi/DAO.java b/src/ai/susi/DAO.java index ecdf7fbe2..8c9372379 100644 --- a/src/ai/susi/DAO.java +++ b/src/ai/susi/DAO.java @@ -692,7 +692,7 @@ public static Map readDrafts(@Nonnull final ClientIdentity identi Map r = new HashMap<>(); if (d == null) return r; if (ids.length == 0) { - d.forEach((id, draft) -> r.put(id, draft)); + d.forEach(r::put); return r; } for (String id: ids) if (d.containsKey(id)) r.put(id, d.get(id)); @@ -704,7 +704,6 @@ public static void deleteDraft(@Nonnull final ClientIdentity identity, final Str if (d != null) d.remove(id); } - public static JSONObject getSkillRating(String model, String group, String language, String skillname) { // rating JsonTray skillRating = DAO.skillRating;