mirror of
https://github.com/corda/corda.git
synced 2025-06-01 15:10:54 +00:00
Suppressed unused variable compiler warnings.
This commit is contained in:
parent
f90c5a702a
commit
b1dbd2a07c
@ -1,5 +1,6 @@
|
|||||||
package net.corda.contracts
|
package net.corda.contracts
|
||||||
|
|
||||||
|
import javafx.beans.property.SimpleObjectProperty
|
||||||
import net.corda.contracts.asset.sumCashBy
|
import net.corda.contracts.asset.sumCashBy
|
||||||
import net.corda.core.contracts.*
|
import net.corda.core.contracts.*
|
||||||
import net.corda.core.crypto.NullPublicKeyTree
|
import net.corda.core.crypto.NullPublicKeyTree
|
||||||
@ -20,6 +21,7 @@ import java.util.*
|
|||||||
val CP_LEGACY_PROGRAM_ID = CommercialPaperLegacy()
|
val CP_LEGACY_PROGRAM_ID = CommercialPaperLegacy()
|
||||||
|
|
||||||
// TODO: Generalise the notion of an owned instrument into a superclass/supercontract. Consider composition vs inheritance.
|
// TODO: Generalise the notion of an owned instrument into a superclass/supercontract. Consider composition vs inheritance.
|
||||||
|
@SuppressWarnings("unused")
|
||||||
class CommercialPaperLegacy : Contract {
|
class CommercialPaperLegacy : Contract {
|
||||||
// TODO: should reference the content of the legal agreement, not its URI
|
// TODO: should reference the content of the legal agreement, not its URI
|
||||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://en.wikipedia.org/wiki/Commercial_paper")
|
override val legalContractReference: SecureHash = SecureHash.sha256("https://en.wikipedia.org/wiki/Commercial_paper")
|
||||||
@ -62,6 +64,8 @@ class CommercialPaperLegacy : Contract {
|
|||||||
val command = tx.commands.requireSingleCommand<CommercialPaperLegacy.Commands>()
|
val command = tx.commands.requireSingleCommand<CommercialPaperLegacy.Commands>()
|
||||||
val timestamp: Timestamp? = tx.timestamp
|
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) {
|
for ((inputs, outputs, key) in groups) {
|
||||||
when (command.value) {
|
when (command.value) {
|
||||||
is Commands.Move -> {
|
is Commands.Move -> {
|
||||||
|
@ -480,6 +480,8 @@ class Obligation<P> : Contract {
|
|||||||
// Create a lookup table of the party that each public key represents.
|
// Create a lookup table of the party that each public key represents.
|
||||||
states.map { it.obligor }.forEach { partyLookup.put(it.owningKey, it) }
|
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) {
|
for ((netState, groupStates) in groups) {
|
||||||
// Extract the net balances
|
// Extract the net balances
|
||||||
val netBalances = netAmountsDue(extractAmountsDue(issued.product, states.asIterable()))
|
val netBalances = netAmountsDue(extractAmountsDue(issued.product, states.asIterable()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user