mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
b45851aecf
commit
b3c41cef98
+4
-4
@@ -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: "
|
||||
|
||||
Reference in New Issue
Block a user