mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fix lint warnings (#46083)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46083 Fix lint warnings changelog: [internal] internal Reviewed By: tdn120 Differential Revision: D61376258 fbshipit-source-id: e4e047e478a4e5a95d5e6b3dea426189f29bb641
This commit is contained in:
1 parent
25d6a152cc
commit
d4d5ab0bba
2 files changed
+6
-2
No files matched your search
+2
-1
@@ -9,6 +9,7 @@ package com.facebook.react.bridge;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.util.Pools.SimplePool;
|
||||
import java.util.Objects;
|
||||
|
||||
/** Implementation of Dynamic wrapping a ReadableMap. */
|
||||
class DynamicFromMap implements Dynamic {
|
||||
@@ -96,7 +97,7 @@ class DynamicFromMap implements Dynamic {
|
||||
if (mMap == null || mName == null) {
|
||||
throw new IllegalStateException("This dynamic value has been recycled");
|
||||
}
|
||||
return mMap.getMap(mName);
|
||||
return Objects.requireNonNull(mMap.getMap(mName));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-1
@@ -80,7 +80,10 @@ public class DynamicFromObject implements Dynamic {
|
||||
if (mObject instanceof ReadableArray) {
|
||||
return ReadableType.Array;
|
||||
}
|
||||
FLog.e(ReactConstants.TAG, "Unmapped object type " + mObject.getClass().getName());
|
||||
FLog.e(
|
||||
ReactConstants.TAG,
|
||||
"Unmapped object type "
|
||||
+ (mObject == null ? "<NULL object>" : mObject.getClass().getName()));
|
||||
return ReadableType.Null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user