Skip to content


Browse files Browse the repository at this point in the history
fix ReadableNativeMap.getNullableValue to match signature (#30121)
This PR changes ReadableNativeMap.getNullableValue to return null if key not found, instead of throwing exception. This matches method signature and nullable annotation.

## Changelog

[Android] [Changed] - fix ReadableNativeMap.getNullableValue to match signature

Pull Request resolved: #30121

Test Plan: RNTester app builds and runs as expected, and getNullableValue will return null instead of throwing exception.

Reviewed By: JoshuaGross

Differential Revision: D24164302

Pulled By: fkgozali

fbshipit-source-id: 572c1d4ae5fd493aa0018c2df1dfc7fc91cb4b6b
  • Loading branch information
dulmandakh authored and facebook-github-bot committed Oct 7, 2020
1 parent d765565 commit 1015194
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -120,7 +120,7 @@ private <T> T getValue(String name, Class<T> type) {
if (hasKey(name)) {
return getLocalMap().get(name);
throw new NoSuchKeyException(name);
return null;

private @Nullable <T> T getNullableValue(String name, Class<T> type) {
Expand Down

0 comments on commit 1015194

Please sign in to comment.