Remove MAX_GROUP_DESCRIPTOR_LENGTH

Closes #441
This commit is contained in:
Torsten Grote
2016-06-22 11:19:16 -03:00
parent 3e4be038f2
commit 59320f02b7
6 changed files with 6 additions and 17 deletions

View File

@@ -1,7 +1,5 @@
package org.briarproject.api.sync;
import static org.briarproject.api.sync.SyncConstants.MAX_GROUP_DESCRIPTOR_LENGTH;
public class Group {
private final GroupId id;
@@ -9,8 +7,6 @@ public class Group {
private final byte[] descriptor;
public Group(GroupId id, ClientId clientId, byte[] descriptor) {
if (descriptor.length > MAX_GROUP_DESCRIPTOR_LENGTH)
throw new IllegalArgumentException();
this.id = id;
this.clientId = clientId;
this.descriptor = descriptor;

View File

@@ -13,9 +13,6 @@ public interface SyncConstants {
/** The maximum length of the packet payload in bytes. */
int MAX_PACKET_PAYLOAD_LENGTH = 32 * 1024; // 32 KiB
/** The maximum length of a group descriptor in bytes. */
int MAX_GROUP_DESCRIPTOR_LENGTH = 100; // TODO: Remove
/** The maximum length of a message in bytes. */
int MAX_MESSAGE_LENGTH = MAX_PACKET_PAYLOAD_LENGTH - PACKET_HEADER_LENGTH;