epugh commented on code in PR #1107:
URL: https://github.com/apache/solr/pull/1107#discussion_r1038473703


##########
solr/core/src/java/org/apache/solr/search/QueryResultKey.java:
##########
@@ -51,20 +52,28 @@ public QueryResultKey(
       Query query, List<Query> filters, Sort sort, int nc_flags, int 
minExactCount) {
     this.query = query;
     this.sort = sort;
-    this.filters = filters;
     this.nc_flags = nc_flags;
     this.minExactCount = minExactCount;
 
     int h = query.hashCode();
 
-    if (filters != null) {
-      for (Query filt : filters)
+    if (filters == null) {
+      this.filters = null;
+    } else {
+      this.filters = 
filters.stream().filter(Objects::nonNull).collect(Collectors.toList());
+      for (Query filt : this.filters) {

Review Comment:
   I'm open to it...   While I like for loops, maybe cause I'm not up on 
stream, we already are doing that...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to