Skip to content

Commit 47cba01

Browse files
committed
Merge branch 'master' of github.com:firebase/firebase-android-sdk into ankita_fis
2 parents 83d7652 + c6e7849 commit 47cba01

31 files changed

+526
-512
lines changed

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/ValidationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public void updatesMustNotContainNestedFieldValueDeletes() {
277277
@Test
278278
public void batchWritesRequireCorrectDocumentReferences() {
279279
DocumentReference badRef = testAlternateFirestore().document("foo/bar");
280-
String reason = "Provided document reference is from a different Firestore instance.";
280+
String reason = "Provided document reference is from a different Cloud Firestore instance.";
281281
Map<String, Object> data = map("foo", 1);
282282
WriteBatch batch = testFirestore().batch();
283283
expectError(() -> batch.set(badRef, data), reason);
@@ -288,7 +288,7 @@ public void batchWritesRequireCorrectDocumentReferences() {
288288
@Test
289289
public void transactionsRequireCorrectDocumentReferences() {
290290
DocumentReference badRef = testAlternateFirestore().document("foo/bar");
291-
String reason = "Provided document reference is from a different Firestore instance.";
291+
String reason = "Provided document reference is from a different Cloud Firestore instance.";
292292
Map<String, Object> data = map("foo", 1);
293293
waitFor(
294294
testFirestore()

firebase-firestore/src/main/java/com/google/firebase/firestore/Blob.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import com.google.firebase.firestore.util.Util;
2424
import com.google.protobuf.ByteString;
2525

26-
/** Immutable class representing an array of bytes in Firestore. */
26+
/** Immutable class representing an array of bytes in Cloud Firestore. */
2727
@PublicApi
2828
public class Blob implements Comparable<Blob> {
2929
private final ByteString bytes;
@@ -33,10 +33,11 @@ private Blob(ByteString bytes) {
3333
}
3434

3535
/**
36-
* Creates a new Blob instance from the provided bytes. Will make a copy of the bytes passed in.
36+
* Creates a new {@code Blob} instance from the provided bytes. Will make a copy of the bytes
37+
* passed in.
3738
*
38-
* @param bytes The bytes to use for this Blob instance.
39-
* @return The new Blob instance
39+
* @param bytes The bytes to use for this {@code Blob} instance.
40+
* @return The new {@code Blob} instance
4041
*/
4142
@NonNull
4243
@PublicApi

firebase-firestore/src/main/java/com/google/firebase/firestore/CollectionReference.java

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
import javax.annotation.Nullable;
2727

2828
/**
29-
* A CollectionReference can be used for adding documents, getting document references, and querying
30-
* for documents (using the methods inherited from Query).
29+
* A {@code CollectionReference} can be used for adding documents, getting document references, and
30+
* querying for documents (using the methods inherited from {@code Query}).
3131
*
32-
* <p><b>Subclassing Note</b>: Firestore classes are not meant to be subclassed except for use in
33-
* test mocks. Subclassing is not supported in production code and new SDK releases may break code
34-
* that does so.
32+
* <p><b>Subclassing Note</b>: Cloud Firestore classes are not meant to be subclassed except for use
33+
* in test mocks. Subclassing is not supported in production code and new SDK releases may break
34+
* code that does so.
3535
*/
3636
@PublicApi
3737
public class CollectionReference extends Query {
@@ -56,11 +56,11 @@ public String getId() {
5656
}
5757

5858
/**
59-
* Gets a DocumentReference to the document that contains this collection. Only subcollections are
60-
* contained in a document. For root collections, returns null.
59+
* Gets a {@code DocumentReference} to the document that contains this collection. Only
60+
* subcollections are contained in a document. For root collections, returns {@code null}.
6161
*
62-
* @return The DocumentReference that contains this collection or null if this is a root
63-
* collection.
62+
* @return The {@code DocumentReference} that contains this collection or {@code null} if this is
63+
* a root collection.
6464
*/
6565
@Nullable
6666
@PublicApi
@@ -86,10 +86,10 @@ public String getPath() {
8686
}
8787

8888
/**
89-
* Returns a DocumentReference pointing to a new document with an auto-generated ID within this
90-
* collection.
89+
* Returns a {@code DocumentReference} pointing to a new document with an auto-generated ID within
90+
* this collection.
9191
*
92-
* @return A DocumentReference pointing to a new document with an auto-generated ID.
92+
* @return A {@code DocumentReference} pointing to a new document with an auto-generated ID.
9393
*/
9494
@NonNull
9595
@PublicApi
@@ -98,11 +98,11 @@ public DocumentReference document() {
9898
}
9999

100100
/**
101-
* Gets a DocumentReference instance that refers to the document at the specified path within this
102-
* collection.
101+
* Gets a {@code DocumentReference} instance that refers to the document at the specified path
102+
* within this collection.
103103
*
104104
* @param documentPath A slash-separated relative path to a document.
105-
* @return The DocumentReference instance.
105+
* @return The {@code DocumentReference} instance.
106106
*/
107107
@NonNull
108108
@PublicApi
@@ -118,7 +118,8 @@ public DocumentReference document(@NonNull String documentPath) {
118118
*
119119
* @param data The data to write to the document (e.g. a Map or a POJO containing the desired
120120
* document contents).
121-
* @return A Task that will be resolved with the DocumentReference of the newly created document.
121+
* @return A Task that will be resolved with the {@code DocumentReference} of the newly created
122+
* document.
122123
*/
123124
@NonNull
124125
@PublicApi

firebase-firestore/src/main/java/com/google/firebase/firestore/DocumentChange.java

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
import javax.annotation.Nullable;
2929

3030
/**
31-
* A DocumentChange represents a change to the documents matching a query. It contains the document
32-
* affected and a the type of change that occurred (added, modified, or removed).
31+
* A {@code DocumentChange} represents a change to the documents matching a query. It contains the
32+
* document affected and a the type of change that occurred (added, modified, or removed).
3333
*
34-
* <p><b>Subclassing Note</b>: Firestore classes are not meant to be subclassed except for use in
35-
* test mocks. Subclassing is not supported in production code and new SDK releases may break code
36-
* that does so.
34+
* <p><b>Subclassing Note</b>: Cloud Firestore classes are not meant to be subclassed except for use
35+
* in test mocks. Subclassing is not supported in production code and new SDK releases may break
36+
* code that does so.
3737
*/
3838
@PublicApi
3939
public class DocumentChange {
@@ -97,11 +97,12 @@ public Type getType() {
9797
}
9898

9999
/**
100-
* Returns the newly added or modified document if this DocumentChange is for an updated document.
101-
* Returns the deleted document if this document change represents a removal.
100+
* Returns the newly added or modified document if this {@code DocumentChange} is for an updated
101+
* document. Returns the deleted document if this document change represents a removal.
102102
*
103-
* @return A snapshot of the new data (for Type.ADDED or Type.MODIFIED) or the removed data (for
104-
* Type.REMOVED).
103+
* @return A snapshot of the new data (for {@link DocumentChange.Type#ADDED} or {@link
104+
* DocumentChange.Type#MODIFIED}) or the removed data (for {@link
105+
* DocumentChange.Type.REMOVED}).
105106
*/
106107
@NonNull
107108
@PublicApi
@@ -110,26 +111,26 @@ public QueryDocumentSnapshot getDocument() {
110111
}
111112

112113
/**
113-
* The index of the changed document in the result set immediately prior to this DocumentChange
114-
* (i.e. supposing that all prior DocumentChange objects have been applied). Returns -1 for
115-
* 'added' events.
114+
* The index of the changed document in the result set immediately prior to this {@code
115+
* DocumentChange} (assuming that all prior {@code DocumentChange} objects have been applied).
116+
* Returns -1 for 'added' events.
116117
*/
117118
@PublicApi
118119
public int getOldIndex() {
119120
return oldIndex;
120121
}
121122

122123
/**
123-
* The index of the changed document in the result set immediately after this DocumentChange (i.e.
124-
* supposing that all prior DocumentChange objects and the current DocumentChange object have been
125-
* applied). Returns -1 for 'removed' events.
124+
* The index of the changed document in the result set immediately after this {@code
125+
* DocumentChange} (assuming that all prior {@code DocumentChange} objects and the current {@code
126+
* DocumentChange} object have been applied). Returns -1 for 'removed' events.
126127
*/
127128
@PublicApi
128129
public int getNewIndex() {
129130
return newIndex;
130131
}
131132

132-
/** Creates the list of DocumentChanges from a ViewSnapshot. */
133+
/** Creates the list of document changes from a {@code ViewSnapshot}. */
133134
static List<DocumentChange> changesFromSnapshot(
134135
FirebaseFirestore firestore, MetadataChanges metadataChanges, ViewSnapshot snapshot) {
135136
List<DocumentChange> documentChanges = new ArrayList<>();

firebase-firestore/src/main/java/com/google/firebase/firestore/DocumentId.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
* <li>This annotation is applied to a property that is not writable (for example, a Java Bean
3333
* getter without a backing field).
3434
* <li>This annotation is applied to a property with a name that conflicts with a read document
35-
* field. For example, if a POJO has a field `firstName` annotated by @DocumentId, and there
36-
* is a property from the document named `firstName` as well, an exception is thrown when you
37-
* try to read the document into the POJO via {@link DocumentSnapshot#toObject} or {@link
38-
* DocumentReference#get}.
35+
* field. For example, if a POJO has a field `firstName` annotated by {@code @DocumentId}, and
36+
* there is a property from the document named `firstName` as well, an exception is thrown
37+
* when you try to read the document into the POJO via {@link DocumentSnapshot#toObject} or
38+
* {@link DocumentReference#get}.
3939
* <li>
4040
* </ul>
4141
*
4242
* <p>When using a POJO to write to a document (via {@link DocumentReference#set} or @{@link
43-
* WriteBatch#set}), the property annotated by @DocumentId is ignored, which allows writing the POJO
44-
* back to any document, even if it's not the origin of the POJO.
43+
* WriteBatch#set}), the property annotated by {@code @DocumentId} is ignored, which allows writing
44+
* the POJO back to any document, even if it's not the origin of the POJO.
4545
*/
4646
@PublicApi
4747
@Retention(RetentionPolicy.RUNTIME)

0 commit comments

Comments
 (0)