diff --git a/fili-core/src/main/java/com/yahoo/bard/webservice/data/config/metric/makers/MetricMaker.java b/fili-core/src/main/java/com/yahoo/bard/webservice/data/config/metric/makers/MetricMaker.java index 10e51409d9..4921076f24 100644 --- a/fili-core/src/main/java/com/yahoo/bard/webservice/data/config/metric/makers/MetricMaker.java +++ b/fili-core/src/main/java/com/yahoo/bard/webservice/data/config/metric/makers/MetricMaker.java @@ -73,7 +73,7 @@ public LogicalMetric make(String metricName, List dependentMetrics) { assertRequiredDependentMetricCount(metricName, dependentMetrics); // Have the subclass actually build the metric - return this.makeInner(metricName, dependentMetrics); + return this.makeInner(new LogicalMetricInfo(metricName), dependentMetrics); } /** @@ -151,7 +151,14 @@ protected LogicalMetric makeInner(String metricName, List dependentMetri * * @return the new logicalMetric */ - protected abstract LogicalMetric makeInner(LogicalMetricInfo logicalMetricInfo, List dependentMetrics); + protected LogicalMetric makeInner(LogicalMetricInfo logicalMetricInfo, List 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.