Skip to content

Commit bb4ddf1

Browse files
authored
chore!: remove deprecated getCollections() methods (#307)
* Remove deprecated Firestore#getCollections() method. Use Firestore#listCollections() instead * Remove deprecated DocumentReference#getCollections() method. Use DocumentReference#listCollections() instead
1 parent 0c841f9 commit bb4ddf1

File tree

4 files changed

+7
-43
lines changed

4 files changed

+7
-43
lines changed

google-cloud-firestore/clirr-ignored-differences.xml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,17 @@
1717

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

21+
<!-- v2.0.0 -->
2722
<difference>
28-
<differenceType>7005</differenceType>
29-
<className>com/google/cloud/firestore/*</className>
30-
<method>*(com.google.cloud.firestore.FirestoreImpl, *)</method>
31-
<to>*(com.google.cloud.firestore.FirestoreRpcContext, *)</to>
23+
<differenceType>7002</differenceType>
24+
<className>com/google/cloud/firestore/DocumentReference</className>
25+
<method>java.lang.Iterable getCollections()</method>
3226
</difference>
3327
<difference>
34-
<differenceType>7009</differenceType>
35-
<className>com/google/cloud/firestore/*</className>
36-
<method>*(com.google.cloud.firestore.FirestoreImpl, *)</method>
28+
<differenceType>7002</differenceType>
29+
<className>com/google/cloud/firestore/Firestore</className>
30+
<method>java.lang.Iterable getCollections()</method>
3731
</difference>
3832

3933
<!--

google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -416,19 +416,6 @@ public void remove() {
416416
};
417417
}
418418

419-
/**
420-
* Fetches the subcollections that are direct children of this document.
421-
*
422-
* @deprecated Use {@link #listCollections()}.
423-
* @throws FirestoreException if the Iterable could not be initialized.
424-
* @return An Iterable that can be used to fetch all subcollections.
425-
*/
426-
@Deprecated
427-
@Nonnull
428-
public Iterable<CollectionReference> getCollections() {
429-
return listCollections();
430-
}
431-
432419
/**
433420
* Starts listening to the document referenced by this DocumentReference.
434421
*

google-cloud-firestore/src/main/java/com/google/cloud/firestore/Firestore.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,6 @@ public interface Firestore extends Service<FirestoreOptions>, AutoCloseable {
5555
@Nonnull
5656
Iterable<CollectionReference> listCollections();
5757

58-
/**
59-
* Fetches the root collections that are associated with this Firestore database.
60-
*
61-
* @deprecated Use {@link #listCollections()}.
62-
* @throws FirestoreException if the Iterable could not be initialized.
63-
* @return An Iterable that can be used to fetch all collections.
64-
*/
65-
@Deprecated
66-
@Nonnull
67-
Iterable<CollectionReference> getCollections();
68-
6958
/**
7059
* Creates and returns a new @link{Query} that includes all documents in the database that are
7160
* contained in a collection or subcollection with the given @code{collectionId}.

google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@ public Iterable<CollectionReference> listCollections() {
120120
return rootDocument.listCollections();
121121
}
122122

123-
@Nonnull
124-
@Override
125-
public Iterable<CollectionReference> getCollections() {
126-
return listCollections();
127-
}
128-
129123
@Nonnull
130124
@Override
131125
public ApiFuture<List<DocumentSnapshot>> getAll(

0 commit comments

Comments
 (0)