mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 03:33:27 +08:00
Use array of correct size when turning List<MetricReader> into an array
This commit is contained in:
parent
a334e93cb9
commit
a0c0822293
@ -71,7 +71,8 @@ public class MetricExportAutoConfiguration {
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user