Simplify construction of spam reporting token providers

This commit is contained in:
Jon Chambers 2023-02-14 11:47:28 -05:00 committed by Jon Chambers
parent cb72158abc
commit b041566aba
1 changed files with 1 additions and 11 deletions

View File

@ -23,16 +23,6 @@ public interface ReportSpamTokenProvider {
* @return the provider
*/
static ReportSpamTokenProvider noop() {
return create(c -> Optional.empty());
}
/**
* Provider which generates ReportSpamTokens using the given function
*
* @param fn function from message requests to optional tokens
* @return the provider
*/
static ReportSpamTokenProvider create(Function<ContainerRequestContext, Optional<byte[]>> fn) {
return fn::apply;
return context -> Optional.empty();
}
}