mirror of
https://github.com/corda/corda.git
synced 2025-01-18 02:39:51 +00:00
Correct ordering of parameters in CordaX500Name (#1501)
Correct ordering of parameters in CordaX500Name and change to named parameters so they can't get incorrect. A constructor with identical types is at high risk of incorrect ordering of values, and therefore it's worth ensuring this can't happen again.
This commit is contained in:
parent
cfd6739d23
commit
eeb51527a1
@ -33,7 +33,7 @@ data class CordaX500Name(val commonName: String?,
|
||||
val locality: String,
|
||||
val state: String?,
|
||||
val country: String) {
|
||||
constructor(commonName: String, organisation: String, locality: String, country: String) : this(null, commonName, organisation, locality, null, country)
|
||||
constructor(commonName: String, organisation: String, locality: String, country: String) : this(commonName = commonName, organisationUnit = null, organisation = organisation, locality = locality, state = null, country = country)
|
||||
/**
|
||||
* @param organisation name of the organisation.
|
||||
* @param locality locality of the organisation, typically nearest major city.
|
||||
|
Loading…
Reference in New Issue
Block a user