Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Fix bug in method for checking name collision #419

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/java/com/twitter/common/metrics/Metrics.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class Metrics implements MetricRegistry, MetricProvider {
private Metrics() { }

private void checkNameCollision(String key) {
if (gauges.containsKey(key) || counters.containsKey(key) || counters.containsKey(key)) {
if (gauges.containsKey(key) || counters.containsKey(key) || histograms.containsKey(key)) {
throw new MetricCollisionException(
"A metric with the name " + key + " has already been defined");
}
Expand Down