From 652d9ce12a862eebc9bc93d3da7b0dfb6fac43fc Mon Sep 17 00:00:00 2001 From: Brandon Fergerson Date: Mon, 16 Oct 2023 09:28:32 -0500 Subject: [PATCH] refactor: hardcode codec uuid --- src/main/kotlin/spp/protocol/marshall/LocalMessageCodec.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/spp/protocol/marshall/LocalMessageCodec.kt b/src/main/kotlin/spp/protocol/marshall/LocalMessageCodec.kt index 031ab33a..75755468 100644 --- a/src/main/kotlin/spp/protocol/marshall/LocalMessageCodec.kt +++ b/src/main/kotlin/spp/protocol/marshall/LocalMessageCodec.kt @@ -26,6 +26,9 @@ import java.util.* * @since 0.1.0 */ class LocalMessageCodec : MessageCodec { + + private val name = UUID.randomUUID().toString() + override fun encodeToWire(buffer: Buffer, o: T): Unit = throw UnsupportedOperationException("Not supported yet.") @@ -33,6 +36,6 @@ class LocalMessageCodec : MessageCodec { throw UnsupportedOperationException("Not supported yet.") override fun transform(o: T): T = o - override fun name(): String = UUID.randomUUID().toString() + override fun name(): String = name override fun systemCodecID(): Byte = -1 }