Skip to content

Commit

Permalink
deprecate mHasConstants in ReactModuleInfo (#39458)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #39458

## Changelog
[Android][Deprecated] - hasConstants in ReactModuleInfo is marked as deprecated

getting rid of `mHasConstants` ivar here and marking the getter as deprecated

Reviewed By: cortinico

Differential Revision: D49262577

fbshipit-source-id: 5394281bdc4a315ffc0d1debfaef1808dc6f4299
  • Loading branch information
philIip authored and facebook-github-bot committed Sep 15, 2023
1 parent 691bd0f commit 196d9f9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public class ReactModuleInfo {
private final String mName;
private final boolean mCanOverrideExistingModule;
private final boolean mNeedsEagerInit;
private final boolean mHasConstants;
private final boolean mIsCxxModule;
private final String mClassName;
private final boolean mIsTurboModule;
Expand All @@ -33,7 +32,6 @@ public ReactModuleInfo(
mClassName = className;
mCanOverrideExistingModule = canOverrideExistingModule;
mNeedsEagerInit = needsEagerInit;
mHasConstants = hasConstants;
mIsCxxModule = isCxxModule;
mIsTurboModule = isTurboModule;
}
Expand All @@ -54,8 +52,10 @@ public boolean needsEagerInit() {
return mNeedsEagerInit;
}

/** @deprecated this is hardcoded to return true, regardless if the module has constants or not */
@Deprecated
public boolean hasConstants() {
return mHasConstants;
return true;
}

public boolean isCxxModule() {
Expand Down

0 comments on commit 196d9f9

Please sign in to comment.