From 0bf3cb6795da38125cd1c0b2b797a9a5e9a65c0c Mon Sep 17 00:00:00 2001 From: Roger Willis Date: Tue, 1 Aug 2017 09:56:54 +0100 Subject: [PATCH] Use LinkedHashSet instead of HashSet as HashSet is BLACKLISTED!! (#1146) --- .../corda/node/services/identity/InMemoryIdentityService.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/src/main/kotlin/net/corda/node/services/identity/InMemoryIdentityService.kt b/node/src/main/kotlin/net/corda/node/services/identity/InMemoryIdentityService.kt index bbdf812c5e..ad1bc49405 100644 --- a/node/src/main/kotlin/net/corda/node/services/identity/InMemoryIdentityService.kt +++ b/node/src/main/kotlin/net/corda/node/services/identity/InMemoryIdentityService.kt @@ -18,6 +18,7 @@ import java.security.cert.* import java.util.* import java.util.concurrent.ConcurrentHashMap import javax.annotation.concurrent.ThreadSafe +import kotlin.collections.LinkedHashSet /** * Simple identity service which caches parties and provides functionality for efficient lookup. @@ -96,7 +97,7 @@ class InMemoryIdentityService(identities: Iterable = emptyS } override fun partiesFromName(query: String, exactMatch: Boolean): Set { - val results = HashSet() + val results = LinkedHashSet() for ((x500name, partyAndCertificate) in principalToParties) { val party = partyAndCertificate.party for (rdn in x500name.rdNs) {