From bd1db700aa470189e0553e78f3455dcb3b5afe2e Mon Sep 17 00:00:00 2001 From: Jonathan Carter Date: Wed, 13 Apr 2016 17:40:26 -0700 Subject: [PATCH] Removing use of ReflectiveOperationException --- .../main/java/com/microsoft/codepush/react/CodePush.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java b/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java index 62cf129..ffc82db 100644 --- a/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +++ b/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java @@ -30,7 +30,7 @@ import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; -import java.lang.ReflectiveOperationException; +import java.lang.Exception; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -413,7 +413,7 @@ public class CodePush implements ReactPackage { try { recreateMethod.invoke(instanceManager); } - catch (ReflectiveOperationException e) { + catch (Exception e) { // The recreation method threw an unknown exception // so just simply fallback to restarting the Activity loadBundleLegacy(); @@ -421,7 +421,7 @@ public class CodePush implements ReactPackage { } }); } - catch (ReflectiveOperationException e) { + catch (Exception e) { // Our reflection logic failed somewhere // so fall back to restarting the Activity loadBundleLegacy();