Skip to content

Commit e87cfec

Browse files
yashasvi128Orbiter
authored andcommitted
Simplified code in DAO, changes to Git Functions (#1174)
* Simplified code in DAO, changes to Git Functions * fixed append i +1 issue
1 parent 34b6981 commit e87cfec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ai/susi/DAO.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ public static Map<String, Draft> readDrafts(@Nonnull final ClientIdentity identi
692692
Map<String, Draft> r = new HashMap<>();
693693
if (d == null) return r;
694694
if (ids.length == 0) {
695-
d.forEach((id, draft) -> r.put(id, draft));
695+
d.forEach(r::put);
696696
return r;
697697
}
698698
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
704704
if (d != null) d.remove(id);
705705
}
706706

707-
708707
public static JSONObject getSkillRating(String model, String group, String language, String skillname) {
709708
// rating
710709
JsonTray skillRating = DAO.skillRating;

0 commit comments

Comments
 (0)