Github user Ethanlm commented on a diff in the pull request:
https://github.com/apache/storm/pull/2771#discussion_r207594931
--- Diff:
storm-server/src/main/java/org/apache/storm/metric/StormMetricsRegistry.java ---
@@ -50,19 +61,19 @@ public static void startMetricsReporters(Map<String,
Object> topoConf) {
}
}
- private static <T extends Metric> T register(final String name, T
metric) {
- T ret;
+ @Override
+ //This is more similar to super#getOrAdd than super#register
+ public <T extends Metric> T register(final String name, T metric)
throws IllegalArgumentException {
--- End diff --
if the metric is MetricSet, it will be having the same issue with the old
code.
---