Skip to content

Commit e32d407

Browse files
committed
Apply code review feedback.
1 parent 414b86a commit e32d407

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

firebase-firestore/CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
Bundles contain pre-packaged data produced with the NodeJS Server SDK and
55
can be used to populate Firestore's cache without reading documents from
66
the backend.
7-
- [fixed] Fix a Firestore bug where local cache inconsistencies were
8-
unnecessarily being resolved, resulting in the incompletion of `Task` objects
9-
returned from `get()` invocations (#2404).
7+
- [fixed] Fixed a Firestore bug where local cache inconsistencies were
8+
unnecessarily being resolved, causing the `Task` objects returned from `get()`
9+
invocations to never complete (#2404).
1010

1111
# (22.0.2)
1212
- [changed] A write to a document that contains FieldValue transforms is no

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import androidx.annotation.VisibleForTesting;
2222
import com.google.android.gms.tasks.Task;
2323
import com.google.android.gms.tasks.TaskCompletionSource;
24-
import com.google.common.collect.ImmutableMap;
25-
import com.google.common.collect.ImmutableSet;
2624
import com.google.firebase.database.collection.ImmutableSortedMap;
2725
import com.google.firebase.database.collection.ImmutableSortedSet;
2826
import com.google.firebase.firestore.FirebaseFirestoreException;
@@ -712,15 +710,15 @@ private void pumpEnqueuedLimboResolutions() {
712710
}
713711

714712
@VisibleForTesting
715-
public ImmutableMap<DocumentKey, Integer> getActiveLimboDocumentResolutions() {
713+
public HashMap<DocumentKey, Integer> getActiveLimboDocumentResolutions() {
716714
// Make a defensive copy as the Map continues to be modified.
717-
return ImmutableMap.copyOf(activeLimboTargetsByKey);
715+
return new HashMap(activeLimboTargetsByKey);
718716
}
719717

720718
@VisibleForTesting
721-
public ImmutableSet<DocumentKey> getEnqueuedLimboDocumentResolutions() {
722-
// Make a defensive copy as the LinkedHashMap continues to be modified.
723-
return ImmutableSet.copyOf(enqueuedLimboResolutions);
719+
public LinkedHashSet<DocumentKey> getEnqueuedLimboDocumentResolutions() {
720+
// Make a defensive copy as the LinkedHashSet continues to be modified.
721+
return new LinkedHashSet(enqueuedLimboResolutions);
724722
}
725723

726724
public void handleCredentialChange(User user) {

0 commit comments

Comments
 (0)