Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit bd1db70

Browse files
committed
Removing use of ReflectiveOperationException
1 parent 36255ce commit bd1db70

File tree

1 file changed

+3
-3
lines changed
  • android/app/src/main/java/com/microsoft/codepush/react

1 file changed

+3
-3
lines changed

android/app/src/main/java/com/microsoft/codepush/react/CodePush.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.json.JSONException;
3131
import org.json.JSONObject;
3232

33-
import java.lang.ReflectiveOperationException;
33+
import java.lang.Exception;
3434
import java.lang.reflect.Field;
3535
import java.lang.reflect.Method;
3636

@@ -413,15 +413,15 @@ public void run() {
413413
try {
414414
recreateMethod.invoke(instanceManager);
415415
}
416-
catch (ReflectiveOperationException e) {
416+
catch (Exception e) {
417417
// The recreation method threw an unknown exception
418418
// so just simply fallback to restarting the Activity
419419
loadBundleLegacy();
420420
}
421421
}
422422
});
423423
}
424-
catch (ReflectiveOperationException e) {
424+
catch (Exception e) {
425425
// Our reflection logic failed somewhere
426426
// so fall back to restarting the Activity
427427
loadBundleLegacy();

0 commit comments

Comments
 (0)