From 0e18e4b3fc8ed207cff79a6043e217f4380b5521 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 3 Feb 2026 13:11:11 -0800 Subject: [PATCH] Fix ReflectionMethodUse: Remove reflection in AnimationDriver error message (#55359) Summary: 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 --- .../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 66b7fe4c398507..dad7f0519ce0b8 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") } }