]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/JsonContactsStore.java
Use nio Files.delete instead of File.delete everywhere
[signal-cli] / src / main / java / org / asamk / signal / JsonContactsStore.java
index e2807d8f2b57b10c930c9f4c56795d7c2f47bc40..500684fe2974b46c9215160d88c30410d12d1409 100644 (file)
@@ -19,15 +19,14 @@ public class JsonContactsStore {
     @JsonDeserialize(using = ContactsDeserializer.class)
     private Map<String, ContactInfo> contacts = new HashMap<>();
 
-    private static final ObjectMapper jsonProcessot = new ObjectMapper();
+    private static final ObjectMapper jsonProcessor = new ObjectMapper();
 
     void updateContact(ContactInfo contact) {
         contacts.put(contact.number, contact);
     }
 
     ContactInfo getContact(String number) {
-        ContactInfo c = contacts.get(number);
-        return c;
+        return contacts.get(number);
     }
 
     List<ContactInfo> getContacts() {
@@ -47,7 +46,7 @@ public class JsonContactsStore {
             Map<String, ContactInfo> contacts = new HashMap<>();
             JsonNode node = jsonParser.getCodec().readTree(jsonParser);
             for (JsonNode n : node) {
-                ContactInfo c = jsonProcessot.treeToValue(n, ContactInfo.class);
+                ContactInfo c = jsonProcessor.treeToValue(n, ContactInfo.class);
                 contacts.put(c.number, c);
             }