From 15ec53105ce82aa3d85ad322b0a2cca16cfe7d0b Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Tue, 4 Aug 2015 10:23:52 +0200 Subject: Rework new measure API --- .../src/main/java/org/sonar/xoo/lang/MeasureSensor.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java index ca06e245d68..7b6506cb334 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java @@ -19,6 +19,10 @@ */ package org.sonar.xoo.lang; +import java.io.File; +import java.io.IOException; +import java.io.Serializable; +import java.util.List; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.sonar.api.batch.fs.InputFile; @@ -31,11 +35,6 @@ import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; import org.sonar.xoo.Xoo; -import java.io.File; -import java.io.IOException; -import java.io.Serializable; -import java.util.List; - /** * Parse files *.xoo.measures */ @@ -89,7 +88,7 @@ public class MeasureSensor implements Sensor { } NewMeasure newMeasure = context.newMeasure() .forMetric(metric) - .onFile(xooFile); + .on(xooFile); if (Boolean.class.equals(metric.valueType())) { newMeasure.withValue(Boolean.parseBoolean(value)); } else if (Integer.class.equals(metric.valueType())) { -- cgit v1.2.3