Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ReactNativeFeatureFlagsProviderHolder -> ReactNativeFeatureFlagsJavaProvider #50080

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<df008a78acc9b0104c54e06849d5e9b9>>
* @generated SignedSource<<c6a66e41c480c72adb2398bfbb140907>>
*/

/**
Expand Down Expand Up @@ -323,7 +323,7 @@ public object ReactNativeFeatureFlags {
* This is **dangerous** because it can introduce consistency issues that will
* be much harder to debug. For example, it could hide the fact that feature
* flags are read before you set the values you want to use everywhere. It
* could also cause a workflow to suddently have different feature flags for
* could also cause a workflow to suddenly have different feature flags for
* behaviors that were configured with different values before.
*
* It returns a string that contains the feature flags that were accessed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c866e69278d249dd79cb2fc193d1a7e2>>
* @generated SignedSource<<9dedcd0160e4271cd3bf373a2c044cb4>>
*/

/**
Expand Down Expand Up @@ -32,10 +32,10 @@ static jni::alias_ref<jni::JClass> getReactNativeFeatureFlagsProviderJavaClass()
* Implementation of ReactNativeFeatureFlagsProvider that wraps a
* ReactNativeFeatureFlagsProvider Java object.
*/
class ReactNativeFeatureFlagsProviderHolder
class ReactNativeFeatureFlagsJavaProvider
: public ReactNativeFeatureFlagsProvider {
public:
explicit ReactNativeFeatureFlagsProviderHolder(
explicit ReactNativeFeatureFlagsJavaProvider(
jni::alias_ref<jobject> javaProvider)
: javaProvider_(make_global(javaProvider)){};

Expand Down Expand Up @@ -509,7 +509,7 @@ void JReactNativeFeatureFlagsCxxInterop::override(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/,
jni::alias_ref<jobject> provider) {
ReactNativeFeatureFlags::override(
std::make_unique<ReactNativeFeatureFlagsProviderHolder>(provider));
std::make_unique<ReactNativeFeatureFlagsJavaProvider>(provider));
}

void JReactNativeFeatureFlagsCxxInterop::dangerouslyReset(
Expand All @@ -521,7 +521,7 @@ jni::local_ref<jstring> JReactNativeFeatureFlagsCxxInterop::dangerouslyForceOver
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/,
jni::alias_ref<jobject> provider) {
auto accessedFlags = ReactNativeFeatureFlags::dangerouslyForceOverride(
std::make_unique<ReactNativeFeatureFlagsProviderHolder>(provider));
std::make_unique<ReactNativeFeatureFlagsJavaProvider>(provider));
if (accessedFlags.has_value()) {
return jni::make_jstring(accessedFlags.value());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<29cdbefbe02064df4fb65388e64f95a4>>
* @generated SignedSource<<cb3921742b4bb8618de0aa9db3931b56>>
*/

/**
Expand Down Expand Up @@ -291,7 +291,7 @@ class ReactNativeFeatureFlags {
* This is **dangerous** because it can introduce consistency issues that will
* be much harder to debug. For example, it could hide the fact that feature
* flags are read before you set the values you want to use everywhere. It
* could also cause a workflow to suddently have different feature flags for
* could also cause a workflow to suddenly have different feature flags for
* behaviors that were configured with different values before.
*
* Please see the documentation of `dangerouslyReset` for additional details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ static jni::alias_ref<jni::JClass> getReactNativeFeatureFlagsProviderJavaClass()
* Implementation of ReactNativeFeatureFlagsProvider that wraps a
* ReactNativeFeatureFlagsProvider Java object.
*/
class ReactNativeFeatureFlagsProviderHolder
class ReactNativeFeatureFlagsJavaProvider
: public ReactNativeFeatureFlagsProvider {
public:
explicit ReactNativeFeatureFlagsProviderHolder(
explicit ReactNativeFeatureFlagsJavaProvider(
jni::alias_ref<jobject> javaProvider)
: javaProvider_(make_global(javaProvider)){};

Expand Down Expand Up @@ -80,7 +80,7 @@ void JReactNativeFeatureFlagsCxxInterop::override(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/,
jni::alias_ref<jobject> provider) {
ReactNativeFeatureFlags::override(
std::make_unique<ReactNativeFeatureFlagsProviderHolder>(provider));
std::make_unique<ReactNativeFeatureFlagsJavaProvider>(provider));
}

void JReactNativeFeatureFlagsCxxInterop::dangerouslyReset(
Expand All @@ -92,7 +92,7 @@ jni::local_ref<jstring> JReactNativeFeatureFlagsCxxInterop::dangerouslyForceOver
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/,
jni::alias_ref<jobject> provider) {
auto accessedFlags = ReactNativeFeatureFlags::dangerouslyForceOverride(
std::make_unique<ReactNativeFeatureFlagsProviderHolder>(provider));
std::make_unique<ReactNativeFeatureFlagsJavaProvider>(provider));
if (accessedFlags.has_value()) {
return jni::make_jstring(accessedFlags.value());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ${Object.entries(definitions.common)
* This is **dangerous** because it can introduce consistency issues that will
* be much harder to debug. For example, it could hide the fact that feature
* flags are read before you set the values you want to use everywhere. It
* could also cause a workflow to suddently have different feature flags for
* could also cause a workflow to suddenly have different feature flags for
* behaviors that were configured with different values before.
*
* It returns a string that contains the feature flags that were accessed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ${Object.entries(definitions.common)
* This is **dangerous** because it can introduce consistency issues that will
* be much harder to debug. For example, it could hide the fact that feature
* flags are read before you set the values you want to use everywhere. It
* could also cause a workflow to suddently have different feature flags for
* could also cause a workflow to suddenly have different feature flags for
* behaviors that were configured with different values before.
*
* Please see the documentation of \`dangerouslyReset\` for additional details.
Expand Down
Loading