File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore/local Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 23
23
import static java .lang .Math .max ;
24
24
25
25
import android .text .TextUtils ;
26
+ import androidx .annotation .NonNull ;
26
27
import androidx .annotation .Nullable ;
27
28
import com .google .firebase .Timestamp ;
28
29
import com .google .firebase .database .collection .ImmutableSortedMap ;
57
58
import java .util .Iterator ;
58
59
import java .util .List ;
59
60
import java .util .Map ;
61
+ import java .util .Objects ;
60
62
import java .util .PriorityQueue ;
61
63
import java .util .Queue ;
62
64
import java .util .SortedSet ;
@@ -476,13 +478,17 @@ public List<DocumentKey> getDocumentsMatchingTarget(Target target) {
476
478
477
479
List <String > subQueries = new ArrayList <>();
478
480
List <Object > bindings = new ArrayList <>();
481
+ List <Target > subTargets = getSubTargets (target );
479
482
480
- for (Target subTarget : getSubTargets ( target ) ) {
483
+ for (Target subTarget : subTargets ) {
481
484
FieldIndex fieldIndex = getFieldIndex (subTarget );
482
485
if (fieldIndex == null ) {
483
486
return null ;
484
487
}
488
+ }
485
489
490
+ for (Target subTarget : subTargets ) {
491
+ @ NonNull FieldIndex fieldIndex = Objects .requireNonNull (getFieldIndex (subTarget ));
486
492
@ Nullable List <Value > arrayValues = subTarget .getArrayValues (fieldIndex );
487
493
@ Nullable Collection <Value > notInValues = subTarget .getNotInValues (fieldIndex );
488
494
Bound lowerBound = subTarget .getLowerBound (fieldIndex );
You can’t perform that action at this time.
0 commit comments