Skip to content

Commit

Permalink
chore!: remove deprecated getCollections() methods (#307)
Browse files Browse the repository at this point in the history
* Remove deprecated Firestore#getCollections() method. Use Firestore#listCollections() instead
* Remove deprecated DocumentReference#getCollections() method. Use DocumentReference#listCollections() instead
  • Loading branch information
BenWhitehead committed Jul 22, 2020
1 parent 0c841f9 commit bb4ddf1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 43 deletions.
20 changes: 7 additions & 13 deletions google-cloud-firestore/clirr-ignored-differences.xml
Expand Up @@ -17,23 +17,17 @@

<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<!-- TODO: Remove after release of 1.33.0 -->
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/firestore/Firestore</className>
<method>com.google.api.core.ApiFuture runAsyncTransaction(*)</method>
</difference>

<!-- v2.0.0 -->
<difference>
<differenceType>7005</differenceType>
<className>com/google/cloud/firestore/*</className>
<method>*(com.google.cloud.firestore.FirestoreImpl, *)</method>
<to>*(com.google.cloud.firestore.FirestoreRpcContext, *)</to>
<differenceType>7002</differenceType>
<className>com/google/cloud/firestore/DocumentReference</className>
<method>java.lang.Iterable getCollections()</method>
</difference>
<difference>
<differenceType>7009</differenceType>
<className>com/google/cloud/firestore/*</className>
<method>*(com.google.cloud.firestore.FirestoreImpl, *)</method>
<differenceType>7002</differenceType>
<className>com/google/cloud/firestore/Firestore</className>
<method>java.lang.Iterable getCollections()</method>
</difference>

<!--
Expand Down
Expand Up @@ -416,19 +416,6 @@ public void remove() {
};
}

/**
* Fetches the subcollections that are direct children of this document.
*
* @deprecated Use {@link #listCollections()}.
* @throws FirestoreException if the Iterable could not be initialized.
* @return An Iterable that can be used to fetch all subcollections.
*/
@Deprecated
@Nonnull
public Iterable<CollectionReference> getCollections() {
return listCollections();
}

/**
* Starts listening to the document referenced by this DocumentReference.
*
Expand Down
Expand Up @@ -55,17 +55,6 @@ public interface Firestore extends Service<FirestoreOptions>, AutoCloseable {
@Nonnull
Iterable<CollectionReference> listCollections();

/**
* Fetches the root collections that are associated with this Firestore database.
*
* @deprecated Use {@link #listCollections()}.
* @throws FirestoreException if the Iterable could not be initialized.
* @return An Iterable that can be used to fetch all collections.
*/
@Deprecated
@Nonnull
Iterable<CollectionReference> getCollections();

/**
* Creates and returns a new @link{Query} that includes all documents in the database that are
* contained in a collection or subcollection with the given @code{collectionId}.
Expand Down
Expand Up @@ -120,12 +120,6 @@ public Iterable<CollectionReference> listCollections() {
return rootDocument.listCollections();
}

@Nonnull
@Override
public Iterable<CollectionReference> getCollections() {
return listCollections();
}

@Nonnull
@Override
public ApiFuture<List<DocumentSnapshot>> getAll(
Expand Down

0 comments on commit bb4ddf1

Please sign in to comment.