Remove net.corda.core.crypto.Party

Remove net.corda.core.crypto.Party rather than deprecate, as it makes it a lot easier to
understand the change that's happened.
This commit is contained in:
Ross Nicoll 2017-05-15 17:43:14 +01:00
parent c13a99a2f9
commit 9aa1ac7009
2 changed files with 1 additions and 9 deletions

View File

@ -1,7 +0,0 @@
package net.corda.core.crypto
import org.bouncycastle.asn1.x500.X500Name
import java.security.PublicKey
@Deprecated("Party has moved to identity package", ReplaceWith("net.corda.core.identity.Party"))
class Party(name: X500Name, owningKey: PublicKey) : net.corda.core.identity.Party(name, owningKey)

View File

@ -26,8 +26,7 @@ import java.security.PublicKey
*
* @see CompositeKey
*/
// TODO: Remove "open" from [Party] once deprecated crypto.Party class is removed
open class Party(val name: X500Name, owningKey: PublicKey) : AbstractParty(owningKey) {
class Party(val name: X500Name, owningKey: PublicKey) : AbstractParty(owningKey) {
constructor(certAndKey: CertificateAndKey) : this(X500Name(certAndKey.certificate.subjectDN.name), certAndKey.keyPair.public)
override fun toString() = "${owningKey.toBase58String()} ($name)"
override fun nameOrNull(): X500Name? = name