mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:13:21 +08:00
Gracefully handle null readers in MetricExportAutoConfiguration
This commit is contained in:
parent
d8af7980ed
commit
54b0613179
@ -69,8 +69,8 @@ public class MetricExportAutoConfiguration {
|
||||
|
||||
Map<String, MetricWriter> writers = new HashMap<String, MetricWriter>();
|
||||
|
||||
MetricReader reader = endpointReader;
|
||||
if (reader == null && !this.readers.isEmpty()) {
|
||||
MetricReader reader = this.endpointReader;
|
||||
if (reader == null && this.readers != null && !this.readers.isEmpty()) {
|
||||
reader = new CompositeMetricReader(this.readers.toArray(new MetricReader[0]));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user