From 1745a5ee6f81fba376110785ddd8546318bee689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=81=A5?= Date: Tue, 13 Jun 2017 10:42:11 +0800 Subject: [PATCH] Fix metric check in case of duplicate metric Closes gh-9497 --- .../actuate/metrics/dropwizard/DropwizardMetricServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 98a70ad8cce..571841d7a1c 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; } }