Uh oh!
There was an error while loading. Please reload this page.
FIX [#642, RUM-3855]: Android Runtime Error in v2.3.1 for ReadableArray.asFirstPartyHosts() - #644
Conversation
6a8e09c to
83d323cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f6ae714 to
800e4c7CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
0db299c to
c955537Comparec955537 to
dc35cfaCompare
0xnm
left a comment
There was a problem hiding this comment.
lgtm! I hope that we add also integration test to check full configuration conversion through the layers.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dc35cfa to
80bd61aCompare80bd61a to
ebd6552Compare
What does this PR do?
ISSUE: #642
INTRODUCED WITH: v2.3.0 in PR #625
Fixes a wrong cast which leads to a Runtime Error.
Details
The tests rely on
JavaOnlyMap, but its methodtoHashMapjust wraps the map using a HashMap, without converting nested maps and arrays.The
ReadableNativeMap, which is the one used in a real use case, has a different implementation oftoHashMap, which recursively converts the nested objects in either stdlib HashMap(s) or ArrayList(s).The error shows up because
.asFirstPartyHosts()performs an unsafe cast toReadableMapfor the nested objects inside of the array, but the actual type isHashMapfrom kotlin stdlib.This PR introduces new conversion functions to ensure that the logic is consistent for different implementations of
ReadableArrayandReadableMap.Review checklist (to be filled by reviewers)