Minor: add a warning suppression over an unchecked cast in the upgrade code.

This commit is contained in:
Mike Hearn 2017-02-18 16:09:20 +00:00
parent 036b2597d3
commit 0b33b52d1a

View File

@ -30,6 +30,7 @@ object ContractUpgradeFlow {
val command = commandData.value as UpgradeCommand
val participants: Set<CompositeKey> = input.participants.toSet()
val keysThatSigned: Set<CompositeKey> = commandData.signers.toSet()
@Suppress("UNCHECKED_CAST")
val upgradedContract = command.upgradedContractClass.newInstance() as UpgradedContract<ContractState, *>
requireThat {
"The signing keys include all participant keys" by keysThatSigned.containsAll(participants)