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:
Krzysztof Magiera
2015-09-24 03:02:33 -07:00
committed by facebook-github-bot-9
parent 944fa4d635
commit 6c3fb77f30
17 changed files with 78 additions and 221 deletions

View File

@@ -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.
*/