diff --git a/solr/core/src/java/org/apache/solr/servlet/PrometheusMetricsServlet.java b/solr/core/src/java/org/apache/solr/servlet/PrometheusMetricsServlet.java index 782af4061d2..517966f7813 100644 --- a/solr/core/src/java/org/apache/solr/servlet/PrometheusMetricsServlet.java +++ b/solr/core/src/java/org/apache/solr/servlet/PrometheusMetricsServlet.java @@ -1028,7 +1028,7 @@ private abstract static class MetricsByPrefixApiCaller extends MetricsApiCaller this.group = group; this.prefix = prefix; this.properties = properties; - this.property = properties.length > 1 ? properties[0] : null; + this.property = properties.length > 0 ? properties[0] : null; } @Override