Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chrylis opened this issue Feb 22, 2024 · 1 comment
Open

Comments

@chrylis
Copy link

chrylis commented Feb 22, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants