mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Back out "Use ClassFinder inside ViewManagerPropertyUpdater" (#44152)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44152 We're seeing an increase of crashes on Twilight (https://www.internalfb.com/logview/twilight_android_crashes/d25ec89876821abdd07f98d08a729f7c?trace_tab=0&ds=%7B%22start%22%3A%22-2%20weeks%22%2C%22end%22%3A%22now%22%7D) related to setting fontWeight with Double instead of String. Original commit changeset: a67195e98377 Original Phabricator Diff: D56191175 Changelog: [Internal] [Changed] - Revert use ClassFinder inside ViewManagerPropertyUpdater Reviewed By: cortinico Differential Revision: D56311183 fbshipit-source-id: e3407ff4858f00f8dadb882221e64a2631105597
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ed6abc4e83
commit
727c4040b8
+3
-8
@@ -9,7 +9,6 @@ package com.facebook.react.uimanager;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.react.common.ClassFinder;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
@@ -110,13 +109,9 @@ public class ViewManagerPropertyUpdater {
|
||||
private static <T> T findGeneratedSetter(Class<?> cls) {
|
||||
String clsName = cls.getName();
|
||||
try {
|
||||
Class<?> setterClass = ClassFinder.findClass(clsName + "$$PropsSetter");
|
||||
if (setterClass != null) {
|
||||
//noinspection unchecked
|
||||
return (T) setterClass.newInstance();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
Class<?> setterClass = Class.forName(clsName + "$$PropsSetter");
|
||||
//noinspection unchecked
|
||||
return (T) setterClass.newInstance();
|
||||
} catch (ClassNotFoundException e) {
|
||||
FLog.w(TAG, "Could not find generated setter for " + cls);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user