From e98631f841443d5f6746f402d6285f37568c305e Mon Sep 17 00:00:00 2001 From: Stefan Fussenegger Date: Tue, 29 Nov 2016 12:54:33 +0100 Subject: [PATCH] don't implement MetricsConfigurer in DelegatingMetricsConfiguration (fixes #184) --- .../annotation/DelegatingMetricsConfiguration.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/ryantenney/metrics/spring/config/annotation/DelegatingMetricsConfiguration.java b/src/main/java/com/ryantenney/metrics/spring/config/annotation/DelegatingMetricsConfiguration.java index ef58337e..ae0bdc01 100755 --- a/src/main/java/com/ryantenney/metrics/spring/config/annotation/DelegatingMetricsConfiguration.java +++ b/src/main/java/com/ryantenney/metrics/spring/config/annotation/DelegatingMetricsConfiguration.java @@ -33,7 +33,7 @@ * @since 3.0 */ @Configuration -public class DelegatingMetricsConfiguration extends MetricsConfigurationSupport implements MetricsConfigurer { +public class DelegatingMetricsConfiguration extends MetricsConfigurationSupport { private MetricsConfigurerComposite delegates = new MetricsConfigurerComposite(); @@ -47,17 +47,12 @@ public void setMetricsConfigurers(final List configurers) { } } - @Override - public void configureReporters(final MetricRegistry metricRegistry) { - this.delegates.configureReporters(metricRegistry); - } - @Bean @Override public MetricRegistry getMetricRegistry() { if (this.metricRegistry == null) { this.metricRegistry = this.delegates.getMetricRegistry(); - this.configureReporters(this.metricRegistry); + this.delegates.configureReporters(this.metricRegistry); } return this.metricRegistry; }