@@ -412,7 +412,7 @@ public ImmutableSortedMap<DocumentKey, MaybeDocument> applyRemoteEvent(RemoteEve
412
412
* Populates the remote document cache with documents from backend or a bundle. Returns the
413
413
* document changes resulting from applying those documents.
414
414
*
415
- * Note: this function will use `documentVersions` if it is defined. When it is not defined, it
415
+ * <p> Note: this function will use `documentVersions` if it is defined. When it is not defined, it
416
416
* resorts to `globalVersion`.
417
417
*
418
418
* @param documents Documents to be applied.
@@ -613,13 +613,14 @@ TargetData getTargetData(Target target) {
613
613
* newer than the currently loading bundle.
614
614
*/
615
615
public boolean hasNewerBundle (BundleMetadata bundleMetadata ) {
616
- return persistence .runTransaction (
617
- "Has newer bundle" , () -> {
618
- BundleMetadata existingMetadata = bundleCache .getBundleMetadata (bundleMetadata .getBundleId ());
619
- return existingMetadata != null
620
- && existingMetadata .getCreateTime ().compareTo (bundleMetadata .getCreateTime ()) > 0 ;
621
- });
622
-
616
+ return persistence .runTransaction (
617
+ "Has newer bundle" ,
618
+ () -> {
619
+ BundleMetadata existingMetadata =
620
+ bundleCache .getBundleMetadata (bundleMetadata .getBundleId ());
621
+ return existingMetadata != null
622
+ && existingMetadata .getCreateTime ().compareTo (bundleMetadata .getCreateTime ()) > 0 ;
623
+ });
623
624
}
624
625
625
626
/** Saves the given BundleMetadata to local persistence. */
@@ -664,7 +665,7 @@ public ImmutableSortedMap<DocumentKey, MaybeDocument> applyBundledDocuments(
664
665
targetCache .addMatchingKeys (documentKeys , umbrellaTargetData .getTargetId ());
665
666
666
667
Map <DocumentKey , MaybeDocument > changedDocs =
667
- populateDocumentChanges (documentMap , versionMap , SnapshotVersion .NONE );
668
+ populateDocumentChanges (documentMap , versionMap , SnapshotVersion .NONE );
668
669
return localDocuments .getLocalViewOfDocuments (changedDocs );
669
670
});
670
671
}
@@ -700,8 +701,7 @@ public void saveNamedQuery(NamedQuery namedQuery, ImmutableSortedSet<DocumentKey
700
701
/** Returns the NameQuery associated with queryName or null if not found. */
701
702
public @ Nullable NamedQuery getNamedQuery (String queryName ) {
702
703
return persistence .runTransaction (
703
- "Get named query" ,
704
- () -> bundleCache .getNamedQuery (queryName ));
704
+ "Get named query" , () -> bundleCache .getNamedQuery (queryName ));
705
705
}
706
706
707
707
/** Mutable state for the transaction in allocateQuery. */
0 commit comments