Skip to content

Commit

Permalink
Use array of correct size when turning List<MetricReader> into an array
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed May 18, 2015
1 parent a334e93 commit a0c0822
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public SchedulingConfigurer metricWritersMetricExporter() {

MetricReader reader = this.endpointReader;
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) {
Expand Down

0 comments on commit a0c0822

Please sign in to comment.