From 485bbda6f47fdcd6e00ce78845928f68506522ec Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 3 Feb 2026 17:09:22 -0800 Subject: [PATCH] Fix ReflectionMethodUse: Remove reflection in AnimationDriver error message (#55359) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55359 Fixed ReflectionMethodUse lint error in AnimationDriver.kt. Replaced `javaClass.simpleName` with a hardcoded string to avoid reflection which can cause issues with Redex obfuscation in production builds. changelog: [internal] internal Reviewed By: javache Differential Revision: D91736698 fbshipit-source-id: 9e6c485825aa8e54e5bbdc2d8d872510f3150c4a --- .../main/java/com/facebook/react/animated/AnimationDriver.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/AnimationDriver.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/AnimationDriver.kt index 66b7fe4c398..dad7f0519ce 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/AnimationDriver.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/AnimationDriver.kt @@ -34,8 +34,6 @@ internal abstract class AnimationDriver { * start animating with the new properties (different destination or spring settings) */ open fun resetConfig(config: ReadableMap) { - throw JSApplicationCausedNativeException( - "Animation config for ${javaClass.simpleName} cannot be reset" - ) + throw JSApplicationCausedNativeException("Animation config for AnimationDriver cannot be reset") } }