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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [firebase_database] DatabaseReferenceWeb uses implements instead of extends; makes DatabaseReferencePlatform fragile #8096

Open
collinjackson opened this issue Feb 16, 2022 · 1 comment
Labels
platform: all Issues / PRs which are for all platforms. plugin: database type: bug Something isn't working

Comments

@collinjackson
Copy link
Contributor

collinjackson commented Feb 16, 2022

Bug report

Describe the bug
In firebase_database, QueryPlatform has a private static final Object _token = Object();. However, Query does not call verifyExtends. By constrast, the analogous class in Firestore does call verifyToken. Also, the other platform classes in this package call verifyToken.

As a result, DatabaseReferenceWeb is able to use implements instead of extends. This makes the platform interface fragile.

Steps to reproduce

Steps to reproduce the behavior:

  1. Add a method to DatabaseReferencePlatform (a "minor" update).
  2. Compile error in DatabaseReferenceWeb because the method is not implemented.

Expected behavior

The implementation of Query should call verifyToken on the instance.

See also #8095.

@collinjackson collinjackson added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Feb 16, 2022
@collinjackson collinjackson changed the title 馃悰 [firebase_database] Query should use verifyExtends. 馃悰 [firebase_database] Query should use verifyExtends Feb 16, 2022
@collinjackson collinjackson changed the title 馃悰 [firebase_database] Query should use verifyExtends 馃悰 [firebase_database] DatabaseReferenceWeb uses implements instead of extends; makes DatabaseReferencePlatform fragile Feb 16, 2022
@darshankawar darshankawar added the triage Issue is currently being triaged. label Feb 17, 2022
@darshankawar
Copy link

Similar / related: #8095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: all Issues / PRs which are for all platforms. plugin: database type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants