aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-cpd-plugin/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-09-26 10:22:14 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-09-26 10:22:14 +0200
commitb99cd6861da25440322c4bd5ed15bd2e626851dc (patch)
tree3859097d3aa9f5a5943b7355c74c2adfb9171e1c /plugins/sonar-cpd-plugin/src
parentc9fbb6a04bc2001bd9fb8519cb127c6c1ed56d29 (diff)
downloadsonarqube-b99cd6861da25440322c4bd5ed15bd2e626851dc.tar.gz
sonarqube-b99cd6861da25440322c4bd5ed15bd2e626851dc.zip
Revert "SONAR-5644, SONAR-5473 Create new SCM extension point and fetch SCM data using WS"
This reverts commit 78fbdc2a8445e9131a10d2210b88d0e4d9927a14.
Diffstat (limited to 'plugins/sonar-cpd-plugin/src')
-rw-r--r--plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdEngine.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdEngine.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdEngine.java
index f8baa2ce642..5dfff7e3dcd 100644
--- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdEngine.java
+++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdEngine.java
@@ -33,7 +33,6 @@ import org.sonar.api.batch.fs.internal.DeprecatedDefaultInputFile;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.duplication.DuplicationBuilder;
import org.sonar.api.batch.sensor.duplication.internal.DefaultDuplicationBuilder;
-import org.sonar.api.batch.sensor.measure.internal.DefaultMeasure;
import org.sonar.api.config.Settings;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.FileLinesContext;
@@ -207,23 +206,20 @@ public class JavaCpdEngine extends CpdEngine {
}
linesContext.save();
// Save
- ((DefaultMeasure<Integer>) context.<Integer>newMeasure()
+ context.<Integer>newMeasure()
.forMetric(CoreMetrics.DUPLICATED_FILES)
.onFile(inputFile)
- .withValue(1))
- .setFromCore()
+ .withValue(1)
.save();
- ((DefaultMeasure<Integer>) context.<Integer>newMeasure()
+ context.<Integer>newMeasure()
.forMetric(CoreMetrics.DUPLICATED_LINES)
.onFile(inputFile)
- .withValue(duplicatedLines.size()))
- .setFromCore()
+ .withValue(duplicatedLines.size())
.save();
- ((DefaultMeasure<Integer>) context.<Integer>newMeasure()
+ context.<Integer>newMeasure()
.forMetric(CoreMetrics.DUPLICATED_BLOCKS)
.onFile(inputFile)
- .withValue(duplicatedBlocks))
- .setFromCore()
+ .withValue(duplicatedBlocks)
.save();
DuplicationBuilder builder = context.duplicationBuilder(inputFile);