From f1aed89ab98d33e0a66e9ee3919756ce7bbc139d Mon Sep 17 00:00:00 2001 From: yrizhkov Date: Wed, 16 Jun 2021 10:25:17 +0300 Subject: [PATCH] return integer value as a string --- .../aerospike/skyhook/listener/key/GetCommandListener.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/aerospike/skyhook/listener/key/GetCommandListener.kt b/src/main/kotlin/com/aerospike/skyhook/listener/key/GetCommandListener.kt index 2d6c4a6..831c36b 100644 --- a/src/main/kotlin/com/aerospike/skyhook/listener/key/GetCommandListener.kt +++ b/src/main/kotlin/com/aerospike/skyhook/listener/key/GetCommandListener.kt @@ -24,7 +24,13 @@ class GetCommandListener( flushCtxTransactionAware() } else { try { - writeResponse(record.bins[aeroCtx.bin]) + val value = record.bins[aeroCtx.bin] + writeResponse( + when (value) { + is Long -> value.toString() + else -> value + } + ) flushCtxTransactionAware() } catch (e: Exception) { closeCtx(e)