Skip to content

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

Open
@collinjackson

Description

@collinjackson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions