reformat kotlin files
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) {