CORDA-3393: Lazy load MessageDeduplicationHandler.flowId (#5679)

CORDA-3393: Lazy load `MessageDeduplicationHandler.flowId` (#5679)
This commit is contained in:
Jonathan Locke 2019-11-07 09:44:03 +00:00 committed by GitHub
commit 86f1f9e371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -425,7 +425,7 @@ class P2PMessagingClient(val config: NodeConfiguration,
private inner class MessageDeduplicationHandler(val artemisMessage: ClientMessage, override val receivedMessage: ReceivedMessage) : DeduplicationHandler, ExternalEvent.ExternalMessageEvent { private inner class MessageDeduplicationHandler(val artemisMessage: ClientMessage, override val receivedMessage: ReceivedMessage) : DeduplicationHandler, ExternalEvent.ExternalMessageEvent {
override val externalCause: ExternalEvent override val externalCause: ExternalEvent
get() = this get() = this
override val flowId: StateMachineRunId = StateMachineRunId.createRandom() override val flowId: StateMachineRunId by lazy { StateMachineRunId.createRandom() }
override val deduplicationHandler: MessageDeduplicationHandler override val deduplicationHandler: MessageDeduplicationHandler
get() = this get() = this