madrob commented on a change in pull request #207:
URL: https://github.com/apache/solr/pull/207#discussion_r667416160



##########
File path: solr/core/src/java/org/apache/solr/search/Grouping.java
##########
@@ -642,16 +639,14 @@ protected DocList 
getDocList(@SuppressWarnings({"rawtypes"})GroupDocs groups) {
       return docs;
     }
 
-    @SuppressWarnings({"unchecked"})
-    protected void addDocList(@SuppressWarnings({"rawtypes"})NamedList rsp
-            , @SuppressWarnings({"rawtypes"})GroupDocs groups) {
+    protected void addDocList(NamedList<? super DocList> rsp, GroupDocs<?> 
groups) {

Review comment:
       The `NamedList rsp` is _consuming_ DocList objects, so we can provide a 
hint and some flexibility by using _super_ here. This construction allows the 
caller to pass a `NamedList<Object>` or `<DocList>` (or `<DocSet>` or 
`<Accountable>` etc... in this case)




-- 
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