diff options
author | Moxie Marlinspike <moxie@thoughtcrime.org> | 2015-02-10 20:16:27 -0800 |
---|---|---|
committer | Moxie Marlinspike <moxie@thoughtcrime.org> | 2015-02-10 20:16:27 -0800 |
commit | 81e91efb3a07bbacffd258c1fb19be12eea4f68b (patch) | |
tree | d6b9ac7b2100f04fddd8e9127262ef96c3652437 /tests/src/main/java/org/whispersystems/libaxolotl/groups/InMemorySenderKeyStore.java | |
parent | a9c42a3641cedec38b555f032d3206ae84e25463 (diff) |
Fix for tests in Android Studio
Diffstat (limited to 'tests/src/main/java/org/whispersystems/libaxolotl/groups/InMemorySenderKeyStore.java')
-rw-r--r-- | tests/src/main/java/org/whispersystems/libaxolotl/groups/InMemorySenderKeyStore.java | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/src/main/java/org/whispersystems/libaxolotl/groups/InMemorySenderKeyStore.java b/tests/src/main/java/org/whispersystems/libaxolotl/groups/InMemorySenderKeyStore.java deleted file mode 100644 index c012566a..00000000 --- a/tests/src/main/java/org/whispersystems/libaxolotl/groups/InMemorySenderKeyStore.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.whispersystems.libaxolotl.groups; - -import org.whispersystems.libaxolotl.groups.state.SenderKeyRecord; -import org.whispersystems.libaxolotl.groups.state.SenderKeyStore; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -public class InMemorySenderKeyStore implements SenderKeyStore { - - private final Map<String, SenderKeyRecord> store = new HashMap<>(); - - @Override - public void storeSenderKey(String senderKeyId, SenderKeyRecord record) { - store.put(senderKeyId, record); - } - - @Override - public SenderKeyRecord loadSenderKey(String senderKeyId) { - try { - SenderKeyRecord record = store.get(senderKeyId); - - if (record == null) { - return new SenderKeyRecord(); - } else { - return new SenderKeyRecord(record.serialize()); - } - } catch (IOException e) { - throw new AssertionError(e); - } - } -} |