mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 17:22:45 +08:00
Static type check for int params + migrate colorInt to just int.
Differential Revision: D2475618 committer: Service User <svcscm@fb.com>
This commit is contained in:
committed by
facebook-github-bot-9
parent
944fa4d635
commit
6c3fb77f30
@@ -33,6 +33,8 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
||||
@Override
|
||||
public native double getDouble(String name);
|
||||
@Override
|
||||
public native int getInt(String name);
|
||||
@Override
|
||||
public native String getString(String name);
|
||||
@Override
|
||||
public native ReadableNativeArray getArray(String name);
|
||||
@@ -46,16 +48,6 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
||||
return new ReadableNativeMapKeySeyIterator(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String name) {
|
||||
return (int) getDouble(name);
|
||||
}
|
||||
|
||||
// Check CatalystStylesDiffMap#getColorInt() to see why this is needed
|
||||
@Override
|
||||
public int getColorInt(String name) {
|
||||
return (int) (long) getDouble(name);
|
||||
}
|
||||
/**
|
||||
* Implementation of a {@link ReadableNativeMap} iterator in native memory.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user