From 4ea7d7d6f0187a3ffa8de7745069d3b4cd45550f Mon Sep 17 00:00:00 2001 From: godotg Date: Sat, 6 Jul 2024 11:07:40 +0800 Subject: [PATCH] perf[kotlin]: null safe --- protocol/src/main/resources/kotlin/ProtocolManagerTemplate.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/src/main/resources/kotlin/ProtocolManagerTemplate.kt b/protocol/src/main/resources/kotlin/ProtocolManagerTemplate.kt index 92d6e5735..116e6d598 100644 --- a/protocol/src/main/resources/kotlin/ProtocolManagerTemplate.kt +++ b/protocol/src/main/resources/kotlin/ProtocolManagerTemplate.kt @@ -31,7 +31,7 @@ class ProtocolManager { } @JvmStatic - fun read(buffer: ByteBuffer): Any? { + fun read(buffer: ByteBuffer): Any { val protocolId = buffer.readShort() return getProtocol(protocolId).read(buffer) }