Change "size > 0" to isNotEmpty()

This commit is contained in:
Ross Nicoll 2017-04-19 13:44:02 +01:00
parent 6c6ed3a758
commit 39ca3c96f9

View File

@ -160,8 +160,8 @@ class Obligation<P : Any> : 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 }