Skip to content

Commit 6f88767

Browse files
Missing renames
1 parent c61f53c commit 6f88767

File tree

7 files changed

+23
-29
lines changed

7 files changed

+23
-29
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import com.google.firebase.firestore.core.ViewSnapshot;
3737
import com.google.firebase.firestore.model.Document;
3838
import com.google.firebase.firestore.model.DocumentKey;
39-
import com.google.firebase.firestore.model.MutableDocument;
4039
import com.google.firebase.firestore.model.ResourcePath;
4140
import com.google.firebase.firestore.model.mutation.DeleteMutation;
4241
import com.google.firebase.firestore.model.mutation.Precondition;

firebase-firestore/src/main/java/com/google/firebase/firestore/core/FirestoreClient.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import com.google.firebase.firestore.local.QueryResult;
3939
import com.google.firebase.firestore.model.Document;
4040
import com.google.firebase.firestore.model.DocumentKey;
41-
import com.google.firebase.firestore.model.MutableDocument;
4241
import com.google.firebase.firestore.model.mutation.Mutation;
4342
import com.google.firebase.firestore.remote.Datastore;
4443
import com.google.firebase.firestore.remote.GrpcMetadataProvider;

firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
import java.util.List;
3333
import java.util.Map;
3434

35-
import javax.annotation.Nullable;
36-
3735
/**
3836
* A readonly view of the local state of all documents we're tracking (i.e. we have a cached version
3937
* in remoteDocumentCache or local mutations for the document). The view is computed by applying the
@@ -73,8 +71,7 @@ IndexManager getIndexManager() {
7371
/**
7472
* Returns the the local view of the document identified by {@code key}.
7573
*
76-
* @return Local view of the document or a null if we don't have any cached state for
77-
* it.
74+
* @return Local view of the document or a null if we don't have any cached state for it.
7875
*/
7976
Document getDocument(DocumentKey key) {
8077
List<MutationBatch> batches = mutationQueue.getAllMutationBatchesAffectingDocumentKey(key);
@@ -208,8 +205,7 @@ private ImmutableSortedMap<DocumentKey, Document> getDocumentsMatchingCollection
208205
MutableDocument document = remoteDocuments.get(key);
209206
if (document == null) {
210207
// Create invalid document to apply mutations on top of
211-
document =
212-
new MutableDocument(key);
208+
document = new MutableDocument(key);
213209
remoteDocuments = remoteDocuments.insert(key, document);
214210
}
215211
mutation.applyToLocalView(document, batch.getLocalWriteTime());

firebase-firestore/src/main/java/com/google/firebase/firestore/local/MemoryRemoteDocumentCache.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@ public ImmutableSortedMap<DocumentKey, MutableDocument> getAllDocumentsMatchingQ
100100
continue;
101101
}
102102

103-
SnapshotVersion readTime = entry.getValue().second;
104-
if (readTime.compareTo(sinceReadTime) <= 0) {
105-
continue;
106-
}
103+
SnapshotVersion readTime = entry.getValue().second;
104+
if (readTime.compareTo(sinceReadTime) <= 0) {
105+
continue;
106+
}
107107

108-
if (!query.matches(doc)) {
109-
continue;
110-
}
108+
if (!query.matches(doc)) {
109+
continue;
110+
}
111111

112-
result = result.insert(doc.getKey(), doc.clone())
112+
result = result.insert(doc.getKey(), doc.clone());
113113
}
114114

115115
return result;

firebase-firestore/src/main/java/com/google/firebase/firestore/local/RemoteDocumentCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ interface RemoteDocumentCache {
5656
*
5757
* @param documentKeys The keys of the entries to look up.
5858
* @return The cached document entries indexed by key. If an entry is not cached, the
59-
* corresponding key will be mapped to an invalid document
59+
* corresponding key will be mapped to an invalid document
6060
*/
6161
Map<DocumentKey, MutableDocument> getAll(Iterable<DocumentKey> documentKeys);
6262

firebase-firestore/src/main/java/com/google/firebase/firestore/model/Document.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ public interface Document {
3939
* Returns whether this document is valid (i.e. it is an entry in the RemoteDocumentCache, was
4040
* created by a mutation or read from the backend).
4141
*/
42-
boolean isValidDocument() ;
42+
boolean isValidDocument();
4343

4444
/** Returns whether the document exists and its data is known at the current version. */
45-
boolean isFoundDocument() ;
45+
boolean isFoundDocument();
4646

4747
/** Returns whether the document is known to not exist at the current version. */
48-
boolean isNoDocument() ;
48+
boolean isNoDocument();
4949

5050
/** Returns whether the document exists and its data is unknown at the current version. */
51-
boolean isUnknownDocument();
51+
boolean isUnknownDocument();
5252

5353
/** Returns the underlying data of this document. Returns an empty value if no data exists. */
5454
ObjectValue getData();

firebase-firestore/src/main/java/com/google/firebase/firestore/model/mutation/Mutation.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ static SnapshotVersion getPostMutationVersion(MutableDocument document) {
154154
* result of applying a transform) for use after a mutation containing transforms has been
155155
* acknowledged by the server.
156156
*
157-
* @param maybeDoc The current state of the document after applying all previous mutations.
157+
* @param mutableDocument The current state of the document after applying all previous mutations.
158158
* @param serverTransformResults The transform results received by the server.
159159
* @return The transform results list.
160160
*/
161161
protected Map<FieldPath, Value> serverTransformResults(
162-
MutableDocument maybeDoc, List<Value> serverTransformResults) {
162+
MutableDocument mutableDocument, List<Value> serverTransformResults) {
163163
Map<FieldPath, Value> transformResults = new HashMap<>(fieldTransforms.size());
164164
hardAssert(
165165
fieldTransforms.size() == serverTransformResults.size(),
@@ -172,8 +172,8 @@ protected Map<FieldPath, Value> serverTransformResults(
172172
TransformOperation transform = fieldTransform.getOperation();
173173

174174
Value previousValue = null;
175-
if (maybeDoc.isFoundDocument()) {
176-
previousValue = maybeDoc.getField(fieldTransform.getFieldPath());
175+
if (mutableDocument.isFoundDocument()) {
176+
previousValue = mutableDocument.getField(fieldTransform.getFieldPath());
177177
}
178178

179179
transformResults.put(
@@ -188,18 +188,18 @@ protected Map<FieldPath, Value> serverTransformResults(
188188
* result of applying a transform) for use when applying a transform locally.
189189
*
190190
* @param localWriteTime The local time of the mutation (used to generate ServerTimestampValues).
191-
* @param maybeDoc The current state of the document after applying all previous mutations.
191+
* @param mutableDocument The current state of the document after applying all previous mutations.
192192
* @return The transform results list.
193193
*/
194194
protected Map<FieldPath, Value> localTransformResults(
195-
Timestamp localWriteTime, MutableDocument maybeDoc) {
195+
Timestamp localWriteTime, MutableDocument mutableDocument) {
196196
Map<FieldPath, Value> transformResults = new HashMap<>(fieldTransforms.size());
197197
for (FieldTransform fieldTransform : fieldTransforms) {
198198
TransformOperation transform = fieldTransform.getOperation();
199199

200200
Value previousValue = null;
201-
if (maybeDoc.isFoundDocument()) {
202-
previousValue = maybeDoc.getField(fieldTransform.getFieldPath());
201+
if (mutableDocument.isFoundDocument()) {
202+
previousValue = mutableDocument.getField(fieldTransform.getFieldPath());
203203
}
204204

205205
transformResults.put(

0 commit comments

Comments
 (0)