From 138e0b28a64075ce01bacdd8acbf8984597d9f23 Mon Sep 17 00:00:00 2001 From: Jens Geyer Date: Sat, 21 Nov 2026 01:46:53 +0100 Subject: [PATCH] Reformat the Kotlin cross-test client and server for ktfmt 0.28.0 Client: kotlin com.ncorti.ktfmt.gradle 0.28.0 (4f6e88b45) puts a trailing comma after the last argument of a multi-line call in the kotlinlang style, so `gradle ktfmtCheck` in lib/kotlin fails on TestClient.kt, TestHandler.kt and TestServer.kt. This is the output of `gradle ktfmtFormat`: it adds those commas and changes nothing else. Co-Authored-By: Claude Opus 5.5 --- .../org/apache/thrift/test/TestClient.kt | 8 ++++---- .../org/apache/thrift/test/TestHandler.kt | 4 ++-- .../org/apache/thrift/test/TestServer.kt | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) 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 41147ffe8b8..3eb5f7153f4 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 @@ -121,7 +121,7 @@ class TestClient : CliktCommand() { else -> throw UnsupportedOperationException( - "only frame transport type is supported for now, got $transportType" + "only frame transport type is supported for now, got $transportType", ) } @@ -280,7 +280,7 @@ class TestClient : CliktCommand() { if (xtructs != null) { for ((string_thing, byte_thing, i32_thing, i64_thing) in xtructs) { print( - "{\"$string_thing\", $byte_thing, $i32_thing, $i64_thing}, " + "{\"$string_thing\", $byte_thing, $i32_thing, $i64_thing}, ", ) } } @@ -536,7 +536,7 @@ private suspend fun ThriftTestClient.structTest(returnCode: Int): Pair { val tNonblockingServerArgs = TNonblockingServer.Args(tNonblockingServerSocket) tNonblockingServerArgs.processor( - if (isMulti) multiplexedProcessor else testProcessor + if (isMulti) multiplexedProcessor else testProcessor, ) tNonblockingServerArgs.protocolFactory(tProtocolFactory) tNonblockingServerArgs.transportFactory(tTransportFactory) @@ -278,7 +278,7 @@ private fun getServerEngine( val tThreadedSelectorServerArgs = TThreadedSelectorServer.Args(tNonblockingServerSocket) tThreadedSelectorServerArgs.processor( - if (isMulti) multiplexedProcessor else testProcessor + if (isMulti) multiplexedProcessor else testProcessor, ) tThreadedSelectorServerArgs.protocolFactory(tProtocolFactory) tThreadedSelectorServerArgs.transportFactory(tTransportFactory) @@ -306,7 +306,7 @@ private fun getServerEngine( else -> { val tThreadPoolServerArgs = TThreadPoolServer.Args(tServerSocket) tThreadPoolServerArgs.processor( - if (isMulti) multiplexedProcessor else testProcessor + if (isMulti) multiplexedProcessor else testProcessor, ) tThreadPoolServerArgs.protocolFactory(tProtocolFactory) tThreadPoolServerArgs.transportFactory(tTransportFactory)