Skip to content

Commit

Permalink
Address @garyluoex's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Sep 15, 2017
1 parent d809c93 commit d713509
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public LogicalMetric make(String metricName, List<String> dependentMetrics) {
assertRequiredDependentMetricCount(metricName, dependentMetrics);

// Have the subclass actually build the metric
return this.makeInner(metricName, dependentMetrics);
return this.makeInner(new LogicalMetricInfo(metricName), dependentMetrics);
}

/**
Expand Down Expand Up @@ -151,7 +151,14 @@ protected LogicalMetric makeInner(String metricName, List<String> dependentMetri
*
* @return the new logicalMetric
*/
protected abstract LogicalMetric makeInner(LogicalMetricInfo logicalMetricInfo, List<String> dependentMetrics);
protected LogicalMetric makeInner(LogicalMetricInfo logicalMetricInfo, List<String> dependentMetrics) {
String message = String.format(
"Current implementation of MetricMaker '%s' does not support makeInner operation",
this.getClass().getSimpleName()
);
LoggerFactory.getLogger(MetricMaker.class).error(message);
throw new UnsupportedOperationException(message);
}

/**
* Get the number of dependent metrics the maker requires for making the metric.
Expand Down

0 comments on commit d713509

Please sign in to comment.