From 22baacd6fb03df099d776b3b41ed6a0defd35e0e Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Mon, 7 Apr 2025 03:09:59 -0700 Subject: [PATCH] Correctly update the warning message for OSS vs Internal (#50486) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50486 Those 2 messages are inverted. Let's fix it. Changelog: [Internal] [Changed] - Reviewed By: cipolleschi Differential Revision: D72451355 fbshipit-source-id: 6aa0636d2cfaf7bf017c376d4d984afb351e1cd8 --- .../common/annotations/internal/LegacyArchitectureLogger.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/annotations/internal/LegacyArchitectureLogger.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/annotations/internal/LegacyArchitectureLogger.kt index b932403ccb7..74309f5d7af 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/annotations/internal/LegacyArchitectureLogger.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/annotations/internal/LegacyArchitectureLogger.kt @@ -33,12 +33,12 @@ public object LegacyArchitectureLogger { private val exceptionMessage: String get() = if (OSS_LEGACY_WARNINGS_ENABLED) { - "is being executed when app is fully running on the NEW Architecture." - } else { "is being executed when `legacyWarningsEnabled` is enabled. " + "You're accessing a legacy API that will be removed in a future version of React Native. " + "You should investigate the stacktrace you find below and understand which class is " + "accessing this API and clean it up." + } else { + "is being executed when app is fully running on the NEW Architecture." } /**