diff --git a/lib/kotlin/cross-test-client/src/main/kotlin/org/apache/thrift/test/TestClient.kt b/lib/kotlin/cross-test-client/src/main/kotlin/org/apache/thrift/test/TestClient.kt
index 39500df..c238d0b 100644
--- a/lib/kotlin/cross-test-client/src/main/kotlin/org/apache/thrift/test/TestClient.kt
+++ b/lib/kotlin/cross-test-client/src/main/kotlin/org/apache/thrift/test/TestClient.kt
@@ -101,9 +101,12 @@
 
     private fun createProtocol(transport: TTransport): TProtocol =
         when (protocolType) {
-            ProtocolType.Binary, ProtocolType.Multi -> TBinaryProtocol(transport)
-            ProtocolType.Compact, ProtocolType.MultiCompact -> TCompactProtocol(transport)
-            ProtocolType.Json, ProtocolType.MultiJson -> TJSONProtocol(transport)
+            ProtocolType.Binary,
+            ProtocolType.Multi -> TBinaryProtocol(transport)
+            ProtocolType.Compact,
+            ProtocolType.MultiCompact -> TCompactProtocol(transport)
+            ProtocolType.Json,
+            ProtocolType.MultiJson -> TJSONProtocol(transport)
         }
 
     private fun createTransport(): TNonblockingTransport =
@@ -283,7 +286,8 @@
                     if (whoa.size == 2 && whoa.containsKey(1L) && whoa.containsKey(2L)) {
                         val firstMap = whoa[1L]!!
                         val secondMap = whoa[2L]!!
-                        if (firstMap.size == 2 &&
+                        if (
+                            firstMap.size == 2 &&
                                 firstMap.containsKey(Numberz.TWO) &&
                                 firstMap.containsKey(Numberz.THREE) &&
                                 secondMap.size == 1 &&
@@ -361,7 +365,8 @@
 
     private suspend fun multiplexTest(returnCode: Int): Int {
         var code = returnCode
-        if (protocolType == ProtocolType.Multi ||
+        if (
+            protocolType == ProtocolType.Multi ||
                 protocolType == ProtocolType.MultiJson ||
                 protocolType == ProtocolType.MultiCompact
         ) {
@@ -574,7 +579,8 @@
     } else {
         val m1 = mm[4]!!
         val m2 = mm[-4]!!
-        if (m1[1] != 1 ||
+        if (
+            m1[1] != 1 ||
                 m1[2] != 2 ||
                 m1[3] != 3 ||
                 m1[4] != 4 ||
diff --git a/lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestServer.kt b/lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestServer.kt
index 566e53d..315d12e 100644
--- a/lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestServer.kt
+++ b/lib/kotlin/cross-test-server/src/main/kotlin/org/apache/thrift/test/TestServer.kt
@@ -226,11 +226,12 @@
 
     private fun getProtocolFactory(): TProtocolFactory =
         when (protocolType) {
-            ProtocolType.Json, ProtocolType.MultiJson -> TJSONProtocol.Factory()
-            ProtocolType.Compact, ProtocolType.MultiCompact ->
-                TCompactProtocol.Factory(stringLimit, containerLimit)
-            ProtocolType.Binary, ProtocolType.Multi ->
-                TBinaryProtocol.Factory(stringLimit, containerLimit)
+            ProtocolType.Json,
+            ProtocolType.MultiJson -> TJSONProtocol.Factory()
+            ProtocolType.Compact,
+            ProtocolType.MultiCompact -> TCompactProtocol.Factory(stringLimit, containerLimit)
+            ProtocolType.Binary,
+            ProtocolType.Multi -> TBinaryProtocol.Factory(stringLimit, containerLimit)
         }
 }
 
@@ -258,7 +259,8 @@
     multiplexedProcessor.registerProcessor("ThriftTest", testProcessor)
     multiplexedProcessor.registerProcessor("SecondService", secondProcessor)
     when (serverType) {
-        ServerType.NonBlocking, ServerType.ThreadedSelector -> {
+        ServerType.NonBlocking,
+        ServerType.ThreadedSelector -> {
             val tNonblockingServerSocket =
                 TNonblockingServerSocket(NonblockingAbstractServerSocketArgs().port(port))
             when (serverType) {
@@ -283,7 +285,8 @@
                 }
             }
         }
-        ServerType.Simple, ServerType.ThreadPool -> {
+        ServerType.Simple,
+        ServerType.ThreadPool -> {
             // SSL socket
             val tServerSocket: TServerSocket =
                 if (ssl) {
