mirror of
https://github.com/corda/corda.git
synced 2025-06-11 20:01:46 +00:00
Use LinkedHashSet instead of HashSet as HashSet is BLACKLISTED!! (#1146)
This commit is contained in:
@ -18,6 +18,7 @@ import java.security.cert.*
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import javax.annotation.concurrent.ThreadSafe
|
import javax.annotation.concurrent.ThreadSafe
|
||||||
|
import kotlin.collections.LinkedHashSet
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple identity service which caches parties and provides functionality for efficient lookup.
|
* Simple identity service which caches parties and provides functionality for efficient lookup.
|
||||||
@ -96,7 +97,7 @@ class InMemoryIdentityService(identities: Iterable<PartyAndCertificate> = emptyS
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun partiesFromName(query: String, exactMatch: Boolean): Set<Party> {
|
override fun partiesFromName(query: String, exactMatch: Boolean): Set<Party> {
|
||||||
val results = HashSet<Party>()
|
val results = LinkedHashSet<Party>()
|
||||||
for ((x500name, partyAndCertificate) in principalToParties) {
|
for ((x500name, partyAndCertificate) in principalToParties) {
|
||||||
val party = partyAndCertificate.party
|
val party = partyAndCertificate.party
|
||||||
for (rdn in x500name.rdNs) {
|
for (rdn in x500name.rdNs) {
|
||||||
|
Reference in New Issue
Block a user