Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6a9c43

Browse files
Add @deprecated annotation to getCollections
1 parent 6b56711 commit f6a9c43

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ public ApiFuture<DocumentSnapshot> get() {
360360
* @throws FirestoreException if the Iterable could not be initialized.
361361
* @return An Iterable that can be used to fetch all subcollections.
362362
*/
363+
@Nonnull
363364
public Iterable<CollectionReference> listCollections() {
364365
ListCollectionIdsRequest.Builder request = ListCollectionIdsRequest.newBuilder();
365366
request.setParent(path.toString());
@@ -406,6 +407,8 @@ public void remove() {
406407
* @throws FirestoreException if the Iterable could not be initialized.
407408
* @return An Iterable that can be used to fetch all subcollections.
408409
*/
410+
@Deprecated
411+
@Nonnull
409412
public Iterable<CollectionReference> getCollections() {
410413
return listCollections();
411414
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public interface Firestore extends Service<FirestoreOptions>, AutoCloseable {
6060
* @return An Iterable that can be used to fetch all collections.
6161
*/
6262
@Nonnull
63+
@Deprecated
6364
Iterable<CollectionReference> getCollections();
6465

6566
/**

0 commit comments

Comments
 (0)