diff --git a/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java b/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java
index 5372d7d46..e7db1f073 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java
@@ -34,7 +34,6 @@ import org.whispersystems.textsecuregcm.sms.TwilioSmsSender;
import org.whispersystems.textsecuregcm.storage.Account;
import org.whispersystems.textsecuregcm.storage.AccountsManager;
import org.whispersystems.textsecuregcm.storage.PendingAccountsManager;
-import org.whispersystems.textsecuregcm.storage.PendingDevicesManager;
import org.whispersystems.textsecuregcm.util.Util;
import org.whispersystems.textsecuregcm.util.VerificationCode;
@@ -60,10 +59,10 @@ public class AccountController {
private final Logger logger = LoggerFactory.getLogger(AccountController.class);
- private final PendingAccountsManager pendingAccounts;
- private final AccountsManager accounts;
- private final RateLimiters rateLimiters;
- private final SmsSender smsSender;
+ private final PendingAccountsManager pendingAccounts;
+ private final AccountsManager accounts;
+ private final RateLimiters rateLimiters;
+ private final SmsSender smsSender;
public AccountController(PendingAccountsManager pendingAccounts,
AccountsManager accounts,
diff --git a/src/main/java/org/whispersystems/textsecuregcm/controllers/DeviceController.java b/src/main/java/org/whispersystems/textsecuregcm/controllers/DeviceController.java
index 4fdaba60b..e8690a735 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/controllers/DeviceController.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/controllers/DeviceController.java
@@ -51,9 +51,9 @@ public class DeviceController {
private final Logger logger = LoggerFactory.getLogger(DeviceController.class);
- private final PendingDevicesManager pendingDevices;
- private final AccountsManager accounts;
- private final RateLimiters rateLimiters;
+ private final PendingDevicesManager pendingDevices;
+ private final AccountsManager accounts;
+ private final RateLimiters rateLimiters;
public DeviceController(PendingDevicesManager pendingDevices,
AccountsManager accounts,
diff --git a/src/main/java/org/whispersystems/textsecuregcm/controllers/FederationController.java b/src/main/java/org/whispersystems/textsecuregcm/controllers/FederationController.java
index 2dcb96f00..20d2ebdd7 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/controllers/FederationController.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/controllers/FederationController.java
@@ -39,7 +39,6 @@ import org.whispersystems.textsecuregcm.util.Pair;
import org.whispersystems.textsecuregcm.util.UrlSigner;
import org.whispersystems.textsecuregcm.util.Util;
-import javax.print.attribute.standard.Media;
import javax.validation.Valid;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
diff --git a/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java b/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java
index f666cf759..22ccdbf63 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java
@@ -42,7 +42,6 @@ import org.whispersystems.textsecuregcm.federation.NoSuchPeerException;
import org.whispersystems.textsecuregcm.limits.RateLimiters;
import org.whispersystems.textsecuregcm.push.PushSender;
import org.whispersystems.textsecuregcm.storage.Account;
-import org.whispersystems.textsecuregcm.storage.AccountsManager;
import org.whispersystems.textsecuregcm.util.Base64;
import org.whispersystems.textsecuregcm.util.IterablePair;
import org.whispersystems.textsecuregcm.util.Pair;
diff --git a/src/main/java/org/whispersystems/textsecuregcm/entities/UnstructuredPreKeyList.java b/src/main/java/org/whispersystems/textsecuregcm/entities/UnstructuredPreKeyList.java
index 3b05b32dc..6dbf58468 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/entities/UnstructuredPreKeyList.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/entities/UnstructuredPreKeyList.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2013 Open WhisperSystems
+ * Copyright (C) 2014 Open WhisperSystems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
diff --git a/src/main/java/org/whispersystems/textsecuregcm/federation/FederatedClient.java b/src/main/java/org/whispersystems/textsecuregcm/federation/FederatedClient.java
index eca167789..61afd759f 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/federation/FederatedClient.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/federation/FederatedClient.java
@@ -30,14 +30,11 @@ import org.apache.http.conn.ssl.StrictHostnameVerifier;
import org.bouncycastle.openssl.PEMReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.whispersystems.textsecuregcm.controllers.NoSuchUserException;
import org.whispersystems.textsecuregcm.entities.AccountCount;
import org.whispersystems.textsecuregcm.entities.AttachmentUri;
import org.whispersystems.textsecuregcm.entities.ClientContact;
import org.whispersystems.textsecuregcm.entities.ClientContacts;
-import org.whispersystems.textsecuregcm.entities.MessageProtos.OutgoingMessageSignal;
import org.whispersystems.textsecuregcm.entities.MessageResponse;
-import org.whispersystems.textsecuregcm.entities.PreKey;
import org.whispersystems.textsecuregcm.entities.RelayMessage;
import org.whispersystems.textsecuregcm.entities.UnstructuredPreKeyList;
import org.whispersystems.textsecuregcm.util.Base64;
diff --git a/src/main/java/org/whispersystems/textsecuregcm/push/PushSender.java b/src/main/java/org/whispersystems/textsecuregcm/push/PushSender.java
index 088b2b297..bd38cdc21 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/push/PushSender.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/push/PushSender.java
@@ -16,7 +16,6 @@
*/
package org.whispersystems.textsecuregcm.push;
-import com.google.common.base.Optional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.textsecuregcm.configuration.ApnConfiguration;
diff --git a/src/main/java/org/whispersystems/textsecuregcm/storage/PendingDeviceRegistrations.java b/src/main/java/org/whispersystems/textsecuregcm/storage/PendingDeviceRegistrations.java
index 1db4db6cb..f87fa2b34 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/storage/PendingDeviceRegistrations.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/storage/PendingDeviceRegistrations.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2013 Open WhisperSystems
+ * Copyright (C) 2014 Open WhisperSystems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
diff --git a/src/main/java/org/whispersystems/textsecuregcm/storage/PendingDevicesManager.java b/src/main/java/org/whispersystems/textsecuregcm/storage/PendingDevicesManager.java
index d67924c16..904f5dca1 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/storage/PendingDevicesManager.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/storage/PendingDevicesManager.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2013 Open WhisperSystems
+ * Copyright (C) 2014 Open WhisperSystems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
diff --git a/src/main/java/org/whispersystems/textsecuregcm/storage/StoredMessageManager.java b/src/main/java/org/whispersystems/textsecuregcm/storage/StoredMessageManager.java
index b400dd914..09ca1ceed 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/storage/StoredMessageManager.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/storage/StoredMessageManager.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2013 Open WhisperSystems
+ * Copyright (C) 2014 Open WhisperSystems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
diff --git a/src/main/java/org/whispersystems/textsecuregcm/storage/StoredMessages.java b/src/main/java/org/whispersystems/textsecuregcm/storage/StoredMessages.java
index 91946644b..9bd1f4f9c 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/storage/StoredMessages.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/storage/StoredMessages.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2013 Open WhisperSystems
+ * Copyright (C) 2014 Open WhisperSystems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -19,7 +19,6 @@ package org.whispersystems.textsecuregcm.storage;
import org.skife.jdbi.v2.sqlobject.Bind;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
import org.skife.jdbi.v2.sqlobject.SqlUpdate;
-import org.whispersystems.textsecuregcm.entities.EncryptedOutgoingMessage;
import java.util.List;
diff --git a/src/main/java/org/whispersystems/textsecuregcm/util/Pair.java b/src/main/java/org/whispersystems/textsecuregcm/util/Pair.java
index 795854969..f7c072af3 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/util/Pair.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/util/Pair.java
@@ -1,3 +1,19 @@
+/**
+ * Copyright (C) 2014 Open WhisperSystems
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
package org.whispersystems.textsecuregcm.util;
import static com.google.common.base.Objects.equal;
diff --git a/src/test/org/whispersystems/textsecuregcm/tests/controllers/AccountControllerTest.java b/src/test/org/whispersystems/textsecuregcm/tests/controllers/AccountControllerTest.java
index ecc7643be..74c01bc74 100644
--- a/src/test/org/whispersystems/textsecuregcm/tests/controllers/AccountControllerTest.java
+++ b/src/test/org/whispersystems/textsecuregcm/tests/controllers/AccountControllerTest.java
@@ -61,11 +61,11 @@ public class AccountControllerTest extends ResourceTest {
private static final String SENDER = "+14152222222";
- private PendingAccountsManager pendingAccountsManager = mock(PendingAccountsManager.class);
- private AccountsManager accountsManager = mock(AccountsManager.class );
- private RateLimiters rateLimiters = mock(RateLimiters.class );
- private RateLimiter rateLimiter = mock(RateLimiter.class );
- private SmsSender smsSender = mock(SmsSender.class );
+ private PendingAccountsManager pendingAccountsManager = mock(PendingAccountsManager.class);
+ private AccountsManager accountsManager = mock(AccountsManager.class );
+ private RateLimiters rateLimiters = mock(RateLimiters.class );
+ private RateLimiter rateLimiter = mock(RateLimiter.class );
+ private SmsSender smsSender = mock(SmsSender.class );
@Override
protected void setUpResources() throws Exception {
diff --git a/src/test/org/whispersystems/textsecuregcm/tests/controllers/DeviceControllerTest.java b/src/test/org/whispersystems/textsecuregcm/tests/controllers/DeviceControllerTest.java
index cdd739e8e..4ce00dde0 100644
--- a/src/test/org/whispersystems/textsecuregcm/tests/controllers/DeviceControllerTest.java
+++ b/src/test/org/whispersystems/textsecuregcm/tests/controllers/DeviceControllerTest.java
@@ -1,3 +1,19 @@
+/**
+ * Copyright (C) 2014 Open WhisperSystems
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
package org.whispersystems.textsecuregcm.tests.controllers;
import com.google.common.base.Optional;
diff --git a/src/test/org/whispersystems/textsecuregcm/tests/entities/PreKeyTest.java b/src/test/org/whispersystems/textsecuregcm/tests/entities/PreKeyTest.java
index a912d5c6a..06c601b54 100644
--- a/src/test/org/whispersystems/textsecuregcm/tests/entities/PreKeyTest.java
+++ b/src/test/org/whispersystems/textsecuregcm/tests/entities/PreKeyTest.java
@@ -14,7 +14,7 @@ public class PreKeyTest {
@Test
public void serializeToJSON() throws Exception {
- PreKey preKey = new PreKey(1, "+14152222222", 0, 1234, "test", "identityTest", false);
+ PreKey preKey = new PreKey(1, "+14152222222", 1, 1234, "test", "identityTest", false);
assertThat("Basic Contact Serialization works",
asJson(preKey),
diff --git a/src/test/resources/fixtures/prekey.json b/src/test/resources/fixtures/prekey.json
index 7197eb82d..fa66d282e 100644
--- a/src/test/resources/fixtures/prekey.json
+++ b/src/test/resources/fixtures/prekey.json
@@ -1,4 +1,5 @@
{
+ "deviceId" : 1,
"keyId" : 1234,
"publicKey" : "test",
"identityKey" : "identityTest"