From adf6a19bfc12edf72edcc2a452dc40260d6525b7 Mon Sep 17 00:00:00 2001 From: FBSourceKtfmtLinter Bot Date: Wed, 24 Jun 2026 05:55:37 -0700 Subject: [PATCH] Daily `arc lint --take KTFMT` Differential Revision: D109548796 --- .../com/facebook/react/utils/JsonUtils.kt | 30 +++++++++---------- .../fabric/mounting/MountItemDispatcher.kt | 8 ++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/gradle-plugin/shared/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt b/packages/gradle-plugin/shared/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt index 6a6eeba7b932..ab632f223483 100644 --- a/packages/gradle-plugin/shared/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt +++ b/packages/gradle-plugin/shared/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt @@ -23,21 +23,21 @@ object JsonUtils { fun fromAutolinkingConfigJson(input: File): ModelAutolinkingConfigJson? = input.bufferedReader().use { reader -> runCatching { - // We sanitize the output of the `config` command as it could contain debug logs - // such as: - // - // > AwesomeProject@0.0.1 npx - // > rnc-cli config - // - // which will render the JSON invalid. - val content = - reader - .readLines() - .filterNot { line -> line.startsWith(">") } - .joinToString("\n") - .trim() - gsonConverter.fromJson(content, ModelAutolinkingConfigJson::class.java) - } + // We sanitize the output of the `config` command as it could contain debug logs + // such as: + // + // > AwesomeProject@0.0.1 npx + // > rnc-cli config + // + // which will render the JSON invalid. + val content = + reader + .readLines() + .filterNot { line -> line.startsWith(">") } + .joinToString("\n") + .trim() + gsonConverter.fromJson(content, ModelAutolinkingConfigJson::class.java) + } .getOrNull() } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt index 984ff9e75074..72257c165077 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt @@ -412,10 +412,10 @@ internal class MountItemDispatcher( } return buildList { - do { - queue.poll()?.let { add(it) } - } while (queue.isNotEmpty()) - } + do { + queue.poll()?.let { add(it) } + } while (queue.isNotEmpty()) + } .takeIf { it.isNotEmpty() } }