madrob commented on PR #2506: URL: https://github.com/apache/solr/pull/2506#issuecomment-2174291405
I don't think this is the right approach. If you can get your hands on a copy of **Effective Java, 3rd Edition**, this is **Item 31: Use bounded wildcards to increase API flexibility**. Later in that section it comes with a warning: > Note that the return type is still Set<E>. Do not use bounded wildcard types as return types. Rather than providing additional flexibility for your users, it would force them to use wildcard types in client code. I suspect that the SolrIndexSearcher method needs to be changed to `<T extends ScoreDoc> TopDocsCollector<T> buildTopDocsCollector` but that doesn't compile and I'm not sure what it would take. -- 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