Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used:
Devices/Android versions reproduced on: emulator, Pixel 7 (Android 14)
Calling `androidx.collection.ArrayMap.entries` on a map with multiple values, returns a set of duplicated entries. As `ArrayMap` implements `Map` interface my expectation is that the `entries` set contains all the entries of the map:
```kotlin
val map: MutableMap<String, Int> = ArrayMap()
map["one"] = 1
map["two"] = 2
map["three"] = 3
// The assertion below fails, actual result is [1, 1, 1]
assertEquals(listOf(1, 2, 3), map.entries.map { it.value })
```
Content: we receive a cloud message `com.google.firebase.messaging.RemoteMessage` from Firebase and want to process its data by calling `getData` returning `Map<String, String>`. Apparently the returned map is `ArrayMap` that breaks our code as we call `entries` on it.