CORDA-435 - AMQP serialisation cannot work with private vals

They won't be reported as properties by the introspector and thus we
will fail to find a constructor for them. This makes sense as we will be
unable to serialise an object whose members we cannot read
This commit is contained in:
Katelyn Baker 2017-10-23 15:08:30 +01:00
parent 97f7c9b79d
commit 303acf715f

View File

@ -138,7 +138,9 @@ class NodeSchedulerServiceTest : SingletonSerializeAsToken() {
resetTestSerialization() resetTestSerialization()
} }
class TestState(private val flowLogicRef: FlowLogicRef, val instant: Instant, private val myIdentity: Party) : LinearState, SchedulableState { // Ignore IntelliJ when it says these properties can be private, if they are we cannot serialise them
// in AMQP.
class TestState(val flowLogicRef: FlowLogicRef, val instant: Instant, val myIdentity: Party) : LinearState, SchedulableState {
override val participants: List<AbstractParty> override val participants: List<AbstractParty>
get() = listOf(myIdentity) get() = listOf(myIdentity)