EZ refactor in ViewManager (#49415)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49415

Refactoring NAME -> TAG for consistency with other classes

changelog: [internal] internal

Reviewed By: Abbondanzo

Differential Revision: D69622546

fbshipit-source-id: 314db29ddfdbbd7fc614b355b9b18c0a8afe31df
This commit is contained in:
David Vacca
2025-02-13 18:27:59 -08:00
committed by Facebook GitHub Bot
parent b45851aecf
commit b3c41cef98
@@ -42,7 +42,7 @@ import java.util.Stack;
public abstract class ViewManager<T extends View, C extends ReactShadowNode>
extends BaseJavaModule {
private static final String NAME = ViewManager.class.getSimpleName();
private static final String TAG = "ViewManager";
private @Nullable ViewManagerDelegate<T> mDelegate = null;
@@ -117,7 +117,7 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
protected ViewManagerDelegate<T> getDelegate() {
if (this instanceof ViewManagerWithGeneratedInterface) {
ReactSoftExceptionLogger.logSoftException(
NAME,
TAG,
new ReactNoCrashSoftException(
"ViewManager using codegen must override getDelegate method (name: "
+ getName()
@@ -237,12 +237,12 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
if (viewContext == null) {
// Who knows! Anything is possible. Checking instanceof on null is an NPE,
// So this is not redundant.
FLog.e(NAME, "onDropViewInstance: view [" + view.getId() + "] has a null context");
FLog.e(TAG, "onDropViewInstance: view [" + view.getId() + "] has a null context");
return;
}
if (!(viewContext instanceof ThemedReactContext)) {
FLog.e(
NAME,
TAG,
"onDropViewInstance: view ["
+ view.getId()
+ "] has a context that is not a ThemedReactContext: "