1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-09 10:19:39 +02:00

Port SelectUserId.validUserIds()

This commit is contained in:
Paul Schaub 2025-03-20 19:33:46 +01:00
parent a00a90c175
commit 2ae9c94841
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -83,11 +83,7 @@ abstract class SelectUserId : Predicate<String>, (String) -> Boolean {
@JvmStatic @JvmStatic
fun validUserId(keyRing: PGPKeyRing) = fun validUserId(keyRing: PGPKeyRing) =
object : SelectUserId() { validUserId(PGPainless.getInstance().toCertificate(keyRing))
private val info = PGPainless.inspectKeyRing(keyRing)
override fun invoke(userId: String): Boolean = info.isUserIdValid(userId)
}
@JvmStatic @JvmStatic
fun and(vararg filters: SelectUserId) = fun and(vararg filters: SelectUserId) =