diff --git a/finance/src/main/kotlin/net/corda/contracts/CommercialPaperLegacy.kt b/finance/src/main/kotlin/net/corda/contracts/CommercialPaperLegacy.kt index 7adf27c70e..41c35bc8e8 100644 --- a/finance/src/main/kotlin/net/corda/contracts/CommercialPaperLegacy.kt +++ b/finance/src/main/kotlin/net/corda/contracts/CommercialPaperLegacy.kt @@ -62,6 +62,8 @@ class CommercialPaperLegacy : Contract { val command = tx.commands.requireSingleCommand() val timestamp: Timestamp? = tx.timestamp + // Suppress compiler warning as 'key' is an unused variable when destructuring 'groups'. + @Suppress("UNUSED_VARIABLE") for ((inputs, outputs, key) in groups) { when (command.value) { is Commands.Move -> { diff --git a/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt b/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt index 1a1f1efbfb..6340ffb782 100644 --- a/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt +++ b/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt @@ -480,6 +480,8 @@ class Obligation

: Contract { // Create a lookup table of the party that each public key represents. states.map { it.obligor }.forEach { partyLookup.put(it.owningKey, it) } + // Suppress compiler warning as 'groupStates' is an unused variable when destructuring 'groups'. + @Suppress("UNUSED_VARIABLE") for ((netState, groupStates) in groups) { // Extract the net balances val netBalances = netAmountsDue(extractAmountsDue(issued.product, states.asIterable()))