Skip to content

Commit 8ec8058

Browse files
author
Richard Hua
committed
Fix 'unchecked call' warnings on classes obtained through reflection
1 parent b665afd commit 8ec8058

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public String getName() {
7979
}
8080

8181
private boolean isReactApplication(Context context) {
82-
Class reactApplicationClass = tryGetClass(REACT_APPLICATION_CLASS_NAME);
82+
Class<?> reactApplicationClass = tryGetClass(REACT_APPLICATION_CLASS_NAME);
8383
if (reactApplicationClass != null && reactApplicationClass.isInstance(context)) {
8484
return true;
8585
}
@@ -119,10 +119,10 @@ private void loadBundle() {
119119
// to get the instance manager via the ReactNativeHost, which only exists in 0.29.
120120
Method getApplicationMethod = ReactActivity.class.getMethod("getApplication");
121121
Object reactApplication = getApplicationMethod.invoke(reactActivity);
122-
Class reactApplicationClass = tryGetClass(REACT_APPLICATION_CLASS_NAME);
122+
Class<?> reactApplicationClass = tryGetClass(REACT_APPLICATION_CLASS_NAME);
123123
Method getReactNativeHostMethod = reactApplicationClass.getMethod("getReactNativeHost");
124124
Object reactNativeHost = getReactNativeHostMethod.invoke(reactApplication);
125-
Class reactNativeHostClass = tryGetClass(REACT_NATIVE_HOST_CLASS_NAME);
125+
Class<?> reactNativeHostClass = tryGetClass(REACT_NATIVE_HOST_CLASS_NAME);
126126
Method getReactInstanceManagerMethod = reactNativeHostClass.getMethod("getReactInstanceManager");
127127
instanceManager = (ReactInstanceManager)getReactInstanceManagerMethod.invoke(reactNativeHost);
128128
} catch (Exception e) {

0 commit comments

Comments
 (0)