From 4f2f54f4b37f1ed139ce2f0b2da1f5dc47d77fb8 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 7 Jul 2023 16:18:32 +0200 Subject: [PATCH] Replace buildMap() call with associateWith() --- .../src/main/kotlin/org/pgpainless/wot/WebOfTrust.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pgpainless-wot/src/main/kotlin/org/pgpainless/wot/WebOfTrust.kt b/pgpainless-wot/src/main/kotlin/org/pgpainless/wot/WebOfTrust.kt index 3d80ab36..83398741 100644 --- a/pgpainless-wot/src/main/kotlin/org/pgpainless/wot/WebOfTrust.kt +++ b/pgpainless-wot/src/main/kotlin/org/pgpainless/wot/WebOfTrust.kt @@ -128,11 +128,7 @@ class WebOfTrust(private val certificateStore: PGPCertificateStore) { } // map user-ids to revocation states - val userIds = buildMap { - cert.userIds.forEach { - put(it, RevocationState(cert.getUserIdRevocation(it))) - } - } + val userIds = cert.userIds.associateWith { RevocationState(cert.getUserIdRevocation(it)) } val node = CertSynopsis(certFingerprint, expirationDate,