mirror of https://github.com/apache/lucene.git
Fix null checks
Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
This commit is contained in:
parent
2d85231f34
commit
feb824e209
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue