Fix metric check in case of duplicate metric
Closes gh-9497
This commit is contained in:
parent
144d987cb8
commit
1745a5ee6f
|
|
@ -148,7 +148,7 @@ public class DropwizardMetricServices implements CounterService, GaugeService {
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException ex) {
|
catch (IllegalArgumentException ex) {
|
||||||
Metric added = this.registry.getMetrics().get(name);
|
Metric added = this.registry.getMetrics().get(name);
|
||||||
registrar.checkExisting(metric);
|
registrar.checkExisting(added);
|
||||||
return (T) added;
|
return (T) added;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue