public void store(Measure newMeasure) {
DefaultMeasure<Serializable> measure = (DefaultMeasure<Serializable>) newMeasure;
if (!measure.isFromCore() && INTERNAL_METRICS.contains(measure.metric())) {
throw new IllegalArgumentException("Metric " + measure.metric().key() + " is an internal metric computed by SonarQube. Please remove or update offending plugin.");
}
InputFile inputFile = measure.inputFile();
if (inputFile != null) {
measureCache.put(def.getKey(), ComponentKeys.createEffectiveKey(def.getKey(), inputFile), measure);
} else {
measureCache.put(def.getKey(), def.getKey(), measure);
}