@@ -149,10 +149,8 @@ private String encodeQueryPath(ResourcePath path) {
149
149
private ResourcePath decodeQueryPath (String name ) {
150
150
ResourcePath resource = decodeResourceName (name );
151
151
if (resource .length () == 4 ) {
152
- // In v1beta1 queries for collections at the root did not have a trailing
153
- // "/documents". In v1
154
- // all resource paths contain "/documents". Preserve the ability to read the v1
155
- // form for
152
+ // In v1beta1 queries for collections at the root did not have a trailing "/documents". In v1
153
+ // all resource paths contain "/documents". Preserve the ability to read the v1 form for
156
154
// compatibility with queries persisted in the local query cache.
157
155
return ResourcePath .EMPTY ;
158
156
} else {
@@ -435,12 +433,9 @@ private FieldTransform decodeFieldTransform(DocumentTransform.FieldTransform fie
435
433
436
434
public MutationResult decodeMutationResult (
437
435
com .google .firestore .v1 .WriteResult proto , SnapshotVersion commitVersion ) {
438
- // NOTE: Deletes don't have an updateTime but the commit timestamp from the
439
- // containing
440
- // CommitResponse or WriteResponse indicates essentially that the delete
441
- // happened no later than
442
- // that. For our purposes we don't care exactly when the delete happened so long
443
- // as we can tell
436
+ // NOTE: Deletes don't have an updateTime but the commit timestamp from the containing
437
+ // CommitResponse or WriteResponse indicates essentially that the delete happened no later than
438
+ // that. For our purposes we don't care exactly when the delete happened so long as we can tell
444
439
// when an update on the watch stream is at or later than that change.
445
440
SnapshotVersion version = decodeVersion (proto .getUpdateTime ());
446
441
if (SnapshotVersion .NONE .equals (version )) {
@@ -499,8 +494,7 @@ public Target encodeTarget(TargetData targetData) {
499
494
500
495
if (targetData .getResumeToken ().isEmpty ()
501
496
&& targetData .getSnapshotVersion ().compareTo (SnapshotVersion .NONE ) > 0 ) {
502
- // TODO(wuandy): Consider removing above check because it is most likely true.
503
- // Right now, many
497
+ // TODO(wuandy): Consider removing above check because it is most likely true. Right now, many
504
498
// tests depend on this behaviour though (leaving min() out of serialization).
505
499
builder .setReadTime (encodeTimestamp (targetData .getSnapshotVersion ().getTimestamp ()));
506
500
} else {
@@ -657,8 +651,7 @@ private StructuredQuery.Filter encodeFilters(List<Filter> filters) {
657
651
private List <Filter > decodeFilters (StructuredQuery .Filter proto ) {
658
652
Filter result = decodeFilter (proto );
659
653
660
- // Instead of a singletonList containing AND(F1, F2, ...), we can return a list
661
- // containing F1,
654
+ // Instead of a singletonList containing AND(F1, F2, ...), we can return a list containing F1,
662
655
// F2, ... to stay consistent with the older SDK versions.
663
656
if (result instanceof com .google .firebase .firestore .core .CompositeFilter ) {
664
657
com .google .firebase .firestore .core .CompositeFilter compositeFilter =
@@ -968,10 +961,8 @@ public WatchChange decodeWatchChange(ListenResponse protoChange) {
968
961
}
969
962
970
963
public SnapshotVersion decodeVersionFromListenResponse (ListenResponse watchChange ) {
971
- // We have only reached a consistent snapshot for the entire stream if there is
972
- // a read_time set
973
- // and it applies to all targets (i.e. the list of targets is empty). The
974
- // backend is guaranteed
964
+ // We have only reached a consistent snapshot for the entire stream if there is a read_time set
965
+ // and it applies to all targets (i.e. the list of targets is empty). The backend is guaranteed
975
966
// to send such responses.
976
967
if (watchChange .getResponseTypeCase () != ResponseTypeCase .TARGET_CHANGE ) {
977
968
return SnapshotVersion .NONE ;
0 commit comments