From 303acf715f4a9a8841f274bd2387b5032285c24b Mon Sep 17 00:00:00 2001 From: Katelyn Baker Date: Mon, 23 Oct 2017 15:08:30 +0100 Subject: [PATCH] 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 --- .../corda/node/services/events/NodeSchedulerServiceTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/src/test/kotlin/net/corda/node/services/events/NodeSchedulerServiceTest.kt b/node/src/test/kotlin/net/corda/node/services/events/NodeSchedulerServiceTest.kt index d8a0c51096..446976faf2 100644 --- a/node/src/test/kotlin/net/corda/node/services/events/NodeSchedulerServiceTest.kt +++ b/node/src/test/kotlin/net/corda/node/services/events/NodeSchedulerServiceTest.kt @@ -138,7 +138,9 @@ class NodeSchedulerServiceTest : SingletonSerializeAsToken() { 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 get() = listOf(myIdentity)