mirror of
https://github.com/corda/corda.git
synced 2025-06-16 14:18:20 +00:00
Corda 1922 serialize states with calculated values (#3938)
* Introduce SerializeForCarpenter annotation * Apply SerializableComputedProperty annotation to Cash.exitKeys, fix bugs * info -> trace * Remove annotation from FungibleAsset, as we do not know whether all implementing classes will provide the property as a calculated value * Remove redundant import * Explicit lambda params * Restore explicit import for Enum valueOf * Moving and rescoping * More meaningful error message * Add java test and documentation * Fix accidentally broken unit test * Ignore superclass annotation if property not calculated in implementing class * Exclude calculated properties from Jackson serialisation * Fix broken test
This commit is contained in:
@ -34,6 +34,7 @@ import net.corda.testing.node.internal.InternalMockNetwork
|
||||
import net.corda.testing.node.internal.startFlow
|
||||
import org.junit.After
|
||||
import org.junit.Test
|
||||
import java.security.PublicKey
|
||||
import java.util.*
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import kotlin.reflect.jvm.jvmName
|
||||
@ -127,7 +128,7 @@ class VaultSoftLockManagerTest {
|
||||
override val owner get() = participants[0]
|
||||
override fun withNewOwner(newOwner: AbstractParty) = throw UnsupportedOperationException()
|
||||
override val amount get() = Amount(1, Issued(PartyAndReference(owner, OpaqueBytes.of(1)), Unit))
|
||||
override val exitKeys get() = throw UnsupportedOperationException()
|
||||
override val exitKeys get() = emptyList<PublicKey>()
|
||||
override fun withNewOwnerAndAmount(newAmount: Amount<Issued<Unit>>, newOwner: AbstractParty) = throw UnsupportedOperationException()
|
||||
override fun equals(other: Any?) = other is FungibleAssetImpl && participants == other.participants
|
||||
override fun hashCode() = participants.hashCode()
|
||||
|
Reference in New Issue
Block a user