aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-08-04 10:23:52 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-08-04 15:53:02 +0200
commit15ec53105ce82aa3d85ad322b0a2cca16cfe7d0b (patch)
treebc8a60b3cee95ae46570517f5f20f15d4fd436d7 /plugins
parent5abbda8671afd4ba05653277e72b6a3005acff03 (diff)
downloadsonarqube-15ec53105ce82aa3d85ad322b0a2cca16cfe7d0b.tar.gz
sonarqube-15ec53105ce82aa3d85ad322b0a2cca16cfe7d0b.zip
Rework new measure API
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java11
1 files changed, 5 insertions, 6 deletions
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<Serializable> 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())) {