diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/BloomFilter.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/BloomFilter.java index 080a5931c45..e51a89906c7 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/BloomFilter.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/BloomFilter.java @@ -27,8 +27,7 @@ public class BloomFilter { private final int hashCount; private final MessageDigest md5HashMessageDigest; - public BloomFilter(@NonNull byte[] bitmap, int padding, int hashCount) - throws BloomFilterException { + public BloomFilter(@NonNull byte[] bitmap, int padding, int hashCount) { if (bitmap == null) { throw new NullPointerException("Bitmap cannot be null."); } diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java index c2ab5bd31b1..435cbca9e24 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java @@ -80,6 +80,9 @@ public interface TargetMetadataProvider { */ private Set pendingTargetResets = new HashSet<>(); + /** The log tag to use for this class. */ + private static final String LOG_TAG = "WatchChangeAggregator"; + public WatchChangeAggregator(TargetMetadataProvider targetMetadataProvider) { this.targetMetadataProvider = targetMetadataProvider; } @@ -236,9 +239,11 @@ private boolean applyBloomFilter(ExistenceFilterWatchChange watchChange, int cur new BloomFilter( bitmap, unchangedNames.getBits().getPadding(), unchangedNames.getHashCount()); } catch (BloomFilterException e) { - if (e instanceof BloomFilterException) { - Logger.warn("Firestore", "BloomFilter error: %s", e); - } + Logger.warn( + LOG_TAG, + "Decoding the base64 bloom filter in existence filter failed (" + + e.getMessage() + + "); ignoring the bloom filter and falling back to full re-query."); return false; }