Fix null checks

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
This commit is contained in:
Harsha Vamsi Kalluri 2024-09-10 10:05:44 -07:00
parent 2d85231f34
commit feb824e209
1 changed files with 7 additions and 3 deletions

View File

@ -512,7 +512,7 @@ public class QueryUtils {
@Override
public LeafReader getLastReader() {
return null;
return lastReader;
}
};
}
@ -522,8 +522,10 @@ public class QueryUtils {
Collection<SimpleCollectorWithLastReader> collectors) {
List<LeafReader> lastReaders = new ArrayList<>();
for (SimpleCollectorWithLastReader collector : collectors) {
if (collector.getLastReader() != null) {
lastReaders.add(collector.getLastReader());
}
}
return lastReaders;
}
});
@ -692,8 +694,10 @@ public class QueryUtils {
public List<LeafReader> reduce(Collection<SimpleCollectorWithLastReader> collectors) {
List<LeafReader> lastReaders = new ArrayList<>();
for (SimpleCollectorWithLastReader collector : collectors) {
if (collector.getLastReader() != null) {
lastReaders.add(collector.getLastReader());
}
}
return lastReaders;
}
});