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

Commit 0c3c393

Browse files
committed
Merge pull request #288 from Microsoft/exception
Removing use of ReflectiveOperationException
2 parents a501a53 + a924ab9 commit 0c3c393

File tree

1 file changed

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

1 file changed

+2
-3
lines changed

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

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

33-
import java.lang.ReflectiveOperationException;
3433
import java.lang.reflect.Field;
3534
import java.lang.reflect.Method;
3635

@@ -413,15 +412,15 @@ public void run() {
413412
try {
414413
recreateMethod.invoke(instanceManager);
415414
}
416-
catch (ReflectiveOperationException e) {
415+
catch (Exception e) {
417416
// The recreation method threw an unknown exception
418417
// so just simply fallback to restarting the Activity
419418
loadBundleLegacy();
420419
}
421420
}
422421
});
423422
}
424-
catch (ReflectiveOperationException e) {
423+
catch (Exception e) {
425424
// Our reflection logic failed somewhere
426425
// so fall back to restarting the Activity
427426
loadBundleLegacy();

0 commit comments

Comments
 (0)