risdenk commented on code in PR #1466: URL: https://github.com/apache/solr/pull/1466#discussion_r1144018575
########## solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java: ########## @@ -1558,7 +1556,7 @@ Solution is q(k) = 1/2 (k^2+k+2) public Builder<E, M> addSubset(Collection<E> subset, M matchValue) { if (!subset.isEmpty()) { TrieSubsetMatcher.Node<E, M> node = root; - for (E e : ImmutableSortedSet.copyOf(subset)) { + for (E e : Collections.unmodifiableSortedSet(new TreeSet<>(subset))) { Review Comment: foreach doesn't allow setting assignment from within the lambda and must be effectively final. The logic `node = node.getOrCreateChild(e);` therefore can't be done in the stream at least from what I can see. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org