From ef64122eb780af1cba318be8a75017780168ef59 Mon Sep 17 00:00:00 2001 From: milaGGL <107142260+milaGGL@users.noreply.github.com> Date: Thu, 23 Nov 2023 15:27:27 -0500 Subject: [PATCH 1/2] Update LocalDocumentsView.java --- .../com/google/firebase/firestore/local/LocalDocumentsView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java index 048d2fc06aa..fde9bc6e3bd 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java @@ -340,7 +340,7 @@ LocalDocumentsResult getNextDocuments(String collectionGroup, IndexOffset offset count - docs.size() > 0 ? documentOverlayCache.getOverlays( collectionGroup, offset.getLargestBatchId(), count - docs.size()) - : Collections.emptyMap(); + : new HashMap<>(); int largestBatchId = FieldIndex.INITIAL_LARGEST_BATCH_ID; for (Overlay overlay : overlays.values()) { From adedf8f1644035f3b11e4a35ead9debe91da7e91 Mon Sep 17 00:00:00 2001 From: milaGGL <107142260+milaGGL@users.noreply.github.com> Date: Fri, 24 Nov 2023 09:37:07 -0500 Subject: [PATCH 2/2] Update CHANGELOG.md --- firebase-firestore/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firebase-firestore/CHANGELOG.md b/firebase-firestore/CHANGELOG.md index 7094f6c03e6..25d95f04691 100644 --- a/firebase-firestore/CHANGELOG.md +++ b/firebase-firestore/CHANGELOG.md @@ -1,4 +1,6 @@ # Unreleased +* [fixed] Fixed an issue caused by calling mutation on immutable map object. [#5573](//github.com/firebase/firebase-android-sdk/pull/5573) + * [fixed] Fixed an issue in the local cache synchronization logic where all locally-cached documents that matched a resumed query would be unnecessarily re-downloaded; with the fix it now only downloads the documents that are known to be out-of-sync. [#5506](//github.com/firebase/firebase-android-sdk/pull/5506)