mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DynamicFromObject.java
Summary: Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them Changelog: [Internal] Reviewed By: alanleedev Differential Revision: D72384067 fbshipit-source-id: b9cc92e41f29cd5af4d277ee8ec0cb3c432bdeec
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dcb2dbb2c3
commit
c692a1185a
+6
@@ -31,32 +31,38 @@ public class DynamicFromObject implements Dynamic {
|
||||
|
||||
@Override
|
||||
public boolean asBoolean() {
|
||||
// NULLSAFE_FIXME[Nullable Dereference]
|
||||
return (boolean) mObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double asDouble() {
|
||||
// NULLSAFE_FIXME[Nullable Dereference]
|
||||
return (double) mObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int asInt() {
|
||||
// Numbers from JS are always Doubles
|
||||
// NULLSAFE_FIXME[Nullable Dereference]
|
||||
return ((Double) mObject).intValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
// NULLSAFE_FIXME[Return Not Nullable]
|
||||
return (String) mObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadableArray asArray() {
|
||||
// NULLSAFE_FIXME[Return Not Nullable]
|
||||
return (ReadableArray) mObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadableMap asMap() {
|
||||
// NULLSAFE_FIXME[Return Not Nullable]
|
||||
return (ReadableMap) mObject;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user