Skip to content
Snippets Groups Projects
Commit 690e3d17 authored by bontric's avatar bontric
Browse files

use final variables in store request

parent c3870951
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,8 @@ import javax.annotation.Nullable;
import static org.briarproject.bramble.mailbox.protocol.MailboxMessage.TYPE.STORE;
public class MailboxRequestStore extends MailboxRequest {
private ContactId contactId;
private byte[] encryptedSyncStream;
private final ContactId contactId;
private final byte[] encryptedSyncStream;
public MailboxRequestStore(ContactId contactId,
byte[] encryptedSyncMessage) {
......@@ -30,7 +30,7 @@ public class MailboxRequestStore extends MailboxRequest {
BdfList body = msg.getList(2);
if(body.size() > 2)
if (body.size() != 2)
throw new FormatException();
Long cId = body.getOptionalLong(0);
......@@ -38,7 +38,8 @@ public class MailboxRequestStore extends MailboxRequest {
if (cId > Integer.MAX_VALUE || cId < Integer.MIN_VALUE)
throw new FormatException();
contactId = new ContactId(cId.intValue());
}
} else
contactId = null;
encryptedSyncStream = body.getRaw(1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment