From 39ca3c96f991519c875cc5f18333ac440fcd0b1c Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Wed, 19 Apr 2017 13:44:02 +0100 Subject: [PATCH] Change "size > 0" to isNotEmpty() --- .../src/main/kotlin/net/corda/contracts/asset/Obligation.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 15a04fb1b1..4007fd80b2 100644 --- a/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt +++ b/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt @@ -160,8 +160,8 @@ class Obligation

: Contract { .filter { it.amount.token in template.acceptableIssuedProducts } // Catch that there's nothing useful here, so we can dump out a useful error requireThat { - "there are fungible asset state outputs" using (assetStates.size > 0) - "there are defined acceptable fungible asset states" using (acceptableAssetStates.size > 0) + "there are fungible asset state outputs" using (assetStates.isNotEmpty()) + "there are defined acceptable fungible asset states" using (acceptableAssetStates.isNotEmpty()) } val amountReceivedByOwner = acceptableAssetStates.groupBy { it.owner }