Clean up any invalid group V1 ids in database.

This commit is contained in:
Alan Evans
2020-11-25 14:21:33 -04:00
parent e1bf23251f
commit 6cbd68fe9f
6 changed files with 71 additions and 20 deletions

View File

@@ -43,13 +43,6 @@ public abstract class GroupId {
}
public static @NonNull GroupId.V1 v1(byte[] gv1GroupIdBytes) throws BadGroupIdException {
if (gv1GroupIdBytes.length == V2_BYTE_LENGTH) {
throw new BadGroupIdException();
}
return new GroupId.V1(gv1GroupIdBytes);
}
public static @NonNull GroupId.V1 v1Exact(byte[] gv1GroupIdBytes) throws BadGroupIdException {
if (gv1GroupIdBytes.length != V1_BYTE_LENGTH) {
throw new BadGroupIdException();
}