Commit a0c08222 authored by Andy Wilkinson's avatar Andy Wilkinson

Use array of correct size when turning List<MetricReader> into an array

parent a334e93c
...@@ -71,7 +71,8 @@ public class MetricExportAutoConfiguration { ...@@ -71,7 +71,8 @@ public class MetricExportAutoConfiguration {
MetricReader reader = this.endpointReader; MetricReader reader = this.endpointReader;
if (reader == null && this.readers != null && !this.readers.isEmpty()) { if (reader == null && this.readers != null && !this.readers.isEmpty()) {
reader = new CompositeMetricReader(this.readers.toArray(new MetricReader[0])); reader = new CompositeMetricReader(
this.readers.toArray(new MetricReader[this.readers.size()]));
} }
if (reader != null) { if (reader != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment