mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 07:58:03 +01:00
Update badge configuration to new style
This commit is contained in:
@@ -22,6 +22,7 @@ import javax.validation.Payload;
|
||||
@Constraint(validatedBy = {
|
||||
ExactlySizeValidatorForString.class,
|
||||
ExactlySizeValidatorForArraysOfByte.class,
|
||||
ExactlySizeValidatorForCollection.class,
|
||||
})
|
||||
@Documented
|
||||
public @interface ExactlySize {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2021 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.util;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class ExactlySizeValidatorForCollection extends ExactlySizeValidator<Collection<?>> {
|
||||
|
||||
@Override
|
||||
protected int size(final Collection<?> value) {
|
||||
return value == null ? 0 : value.size();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user