firebase / firebase-admin-java

Firebase Admin Java SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
543 stars 269 forks source link

[FR] Improvement: Change updateChildren parameter to Map<String, ?> #917

Open chrylis opened 8 months ago

chrylis commented 8 months ago

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<String, Object>.

Describe the solution you'd like Since these method consume the map and do not modify it, they could be defined as Map<String, ?> 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.

google-oss-bot commented 8 months ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.