firebase / firebase/firebase-admin-java
[FR] Improvement: Change updateChildren parameter to Map<String, ?>
- Vorherrschende Sprache
- Java
- Sterne
- 620
- Forks
- 305
- Ø Merge
- 3 Std. 23 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
**Is your feature request related to a problem? Please describe.**
Various builders (e.g., `Map.of`) and language features (e.g., Groovy and Kotlin inline maps) create `Map` instances whose `V` bound is more strict than `Object`. Currently, the `DatabaseRef#updateChildren[Async]` interface won't accept these instances because it is defined as accepting `Map`.
**Describe the solution you'd like**
Since these method consume the map and do not modify it, they could be defined as `Map` to accept a map with any generic value type with no backwards incompatibility or other code changes.
**Describe alternatives you've considered**
Otherwise, passing in maps usually requires an explicit type declaration instead of `var` or an inline builder.
Beitragsleitfaden
Rechercherichtung
Suche nach den Einstiegspunkten DatabaseRef#updateChildren und updateChildrenAsync und untersuche anschließend deren Deklarationen sowie alle zugehörigen Tests. Bestätige, dass die Methoden Map akzeptieren, ohne ihr bestehendes Update-Verhalten zu ändern, und führe die relevante Java-Testsuite aus.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- databases
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 35/100