diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/DropwizardMetricServices.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/DropwizardMetricServices.java index 2872a8324bc..64d11a5605f 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/DropwizardMetricServices.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/DropwizardMetricServices.java @@ -148,7 +148,7 @@ public class DropwizardMetricServices implements CounterService, GaugeService { } catch (IllegalArgumentException ex) { Metric added = this.registry.getMetrics().get(name); - registrar.checkExisting(metric); + registrar.checkExisting(added); return (T) added; } }