Gracefully handle null readers in MetricExportAutoConfiguration

This commit is contained in:
Andy Wilkinson 2015-05-18 16:29:55 +01:00
parent d8af7980ed
commit 54b0613179

View File

@ -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]));
}