Skip to content

Commit 11dd88b

Browse files
committed
More code can be deleted.
1 parent 0f449ad commit 11dd88b

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

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

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -97,36 +97,6 @@ Document getDocument(DocumentKey key) {
9797
return fromOverlay;
9898
}
9999

100-
// Internal version of {@code getDocument} that allows reusing batches.
101-
private Document getDocument(DocumentKey key, List<MutationBatch> inBatches) {
102-
MutableDocument document = remoteDocumentCache.get(key);
103-
for (MutationBatch batch : inBatches) {
104-
batch.applyToLocalView(document);
105-
}
106-
return document;
107-
}
108-
109-
/**
110-
* Applies the given {@code batches} to the given {@code docs}. The docs are updated to reflect
111-
* the contents of the mutations.
112-
*
113-
* <p>Returns a {@link DocumentKey} to {@link FieldMask} map, representing the fields mutated for
114-
* each document. This is useful to build overlays.
115-
*/
116-
private Map<DocumentKey, FieldMask> applyLocalMutationsToDocuments(
117-
Map<DocumentKey, MutableDocument> docs, List<MutationBatch> batches) {
118-
Map<DocumentKey, FieldMask> changedMasks = new HashMap<>();
119-
for (Map.Entry<DocumentKey, MutableDocument> base : docs.entrySet()) {
120-
FieldMask mask = null;
121-
for (MutationBatch batch : batches) {
122-
mask = batch.applyToLocalView(base.getValue(), mask);
123-
}
124-
changedMasks.put(base.getKey(), mask);
125-
}
126-
127-
return changedMasks;
128-
}
129-
130100
/**
131101
* Gets the local view of the documents identified by {@code keys}.
132102
*
@@ -280,9 +250,7 @@ private ImmutableSortedMap<DocumentKey, Document> getDocumentsMatchingCollection
280250

281251
private ImmutableSortedMap<DocumentKey, Document> getDocumentsMatchingCollectionQuery(
282252
Query query, IndexOffset offset) {
283-
ImmutableSortedMap<DocumentKey, Document> fromOverlay =
284-
getDocumentsMatchingCollectionQueryFromOverlayCache(query, offset);
285-
return fromOverlay;
253+
return getDocumentsMatchingCollectionQueryFromOverlayCache(query, offset);
286254
}
287255

288256
/** Queries the remote documents and overlays by doing a full collection scan. */

0 commit comments

Comments
 (0)