Skip to content

Commit c27c051

Browse files
author
Brian Chen
committed
fix compareTo in FieldIndex
1 parent 6d64d18 commit c27c051

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ public Map<Document, Integer> getDocumentsBatchIdsMatchingCollectionGroupQuery(
337337
Query collectionQuery = query.asCollectionQueryAtPath(parent.append(collectionId));
338338
Map<Document, Integer> documentToBatchIds =
339339
getDocumentsMatchingCollectionQueryWithBatchId(collectionQuery, offset);
340-
;
341340
results.putAll(documentToBatchIds);
342341
}
343342
return results;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public int compareTo(IndexOffset other) {
176176
if (cmp != 0) return cmp;
177177
cmp = getDocumentKey().compareTo(other.getDocumentKey());
178178
if (cmp != 0) return cmp;
179-
return getLargestBatchId() < other.getLargestBatchId() ? -1 : 1;
179+
return Integer.signum(getLargestBatchId() - other.getLargestBatchId());
180180
}
181181
}
182182

0 commit comments

Comments
 (0)