cpoerschke commented on a change in pull request #207: URL: https://github.com/apache/solr/pull/207#discussion_r666448816
########## File path: solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java ########## @@ -159,9 +159,7 @@ private Object getParams0(String param) { if (o == null) o = pathValues.get(param); if (o == null && useRequestParams) o = origParams.getParams(param); if (o instanceof List) { - @SuppressWarnings({"rawtypes"}) - List l = (List) o; - return l.toArray(new String[l.size()]); + return ((List<?>) o).toArray(); Review comment: This change is very interesting but I'm struggling to convince myself that and how it won't affect the `instanceof String[]` condition outcomes in the callers? ########## File path: solr/core/src/java/org/apache/solr/metrics/reporters/SolrSlf4jReporter.java ########## @@ -85,7 +85,7 @@ public void report() { } @Override - @SuppressWarnings({"rawtypes"}) + @SuppressWarnings("rawtypes") // super uses raw Gauge, so we're stuck with it Review comment: > // super uses raw Gauge, so we're stuck with it Thanks for adding the comment here! I haven't yet looked but in principle would be curious if the super class could potentially (in a future version) remove the raw use, in which case we could in the comment also reference the JIRA or other issue corresponding to such a change. ########## File path: solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java ########## @@ -233,14 +232,14 @@ else if (r != null) { } return out; } - - @SuppressWarnings({"rawtypes"}) + + @SuppressWarnings("unchecked") public Object diffObject(Object ref, Object now) { if (now instanceof Map) { - now = new NamedList((Map)now); + now = new NamedList<>((Map<String, ?>)now); Review comment: question: (how) do we know that `<String, ?>` is right here? ```suggestion now = new NamedList<>((Map<?, ?>)now); ``` ########## File path: solr/core/src/java/org/apache/solr/core/SolrCore.java ########## @@ -2339,8 +2339,7 @@ public IndexFingerprint getIndexFingerprint(SolrIndexSearcher searcher, LeafRead final SolrIndexSearcher currSearcher = currSearcherHolder == null ? null : currSearcherHolder.get(); - @SuppressWarnings({"rawtypes"}) - Future future = null; + Future<Void> future = null; Review comment: existing code observation: i guess strictly speaking the `if (waitSearcher != null) waitSearcher[0] = future;` later on should be `if (waitSearcher != null && waitSearcher.length > 0) waitSearcher[0] = future;` -- 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