mlbiscoc commented on code in PR #2405: URL: https://github.com/apache/solr/pull/2405#discussion_r1612305013
########## solr/core/src/java/org/apache/solr/response/PrometheusResponseWriter.java: ########## @@ -54,11 +54,11 @@ public void write(OutputStream out, SolrQueryRequest request, SolrQueryResponse throws IOException { NamedList<Object> prometheusRegistries = (NamedList<Object>) response.getValues().get("metrics"); - Iterator<Map.Entry<String, Object>> it = prometheusRegistries.iterator(); var prometheusTextFormatWriter = new PrometheusTextFormatWriter(false); - while (it.hasNext()) { - Map.Entry<String, Object> entry = it.next(); - SolrPrometheusCoreExporter prometheusExporter = (SolrPrometheusCoreExporter) entry.getValue(); + for (Iterator<Map.Entry<String, Object>> iter = prometheusRegistries.iterator(); Review Comment: Sorry was never they best at Java. The enhanced for from the hint is a lot better -- 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